

More cursor effects in Pro
Cursor trails and pointer effects that give a site its own feel.
firstContent | ReactNode | Content shown at rest. | |
secondContent | ReactNode | Content that builds in pixel by pixel. | |
pattern | 'pointer' | 'random' | 'center' | 'edges' | 'left-to-right' | 'right-to-left' | 'top-to-bottom' | 'bottom-to-top' | 'diagonal' | 'spiral' | 'pointer' | Order the pixels arrive in. Pointer starts the wave where the cursor enters, leaves or clicks. |
pixelSize | 48 | Edge length of each pixel in px. Grows automatically when the grid would pass 600 pixels. | |
gap | Space between pixels in px while they grow. | ||
pixelRadius | Corner rounding of the pixels while they grow, as a percentage. 50 starts them as dots. | ||
pixelScale | Size each pixel pops in at, from 0 to grow out of nothing to 0.9 for a hard pop. | ||
pixelSpin | Degrees each pixel turns as it grows in. | ||
duration | 400 | Time in ms the wave takes to cross the content. | |
pixelDuration | 350 | Time in ms a single pixel takes to grow. | |
randomness | 0.2 | Noise mixed into the pattern, from 0 for a clean wave to 1 for a scatter. | |
bounce | 0.3 | How far each pixel overshoots before it settles, from 0 to 1. | |
trigger | 'hover' | 'click' | 'none' | 'hover' | What starts the swap. With none, drive it with active. |
| Builds the first content in from pixels on mount. | |||
initialActive | Starts on the second content. | ||
active | Controls which content shows. Pair it with onActiveChange. | ||
onActiveChange | (active: boolean) => void | Called when the trigger asks to swap. | |
onComplete | (active: boolean) => void | Called when a swap finishes. | |
aspectRatio | '16 / 10' | Aspect ratio of the root. | |
| Extra class names for the root. | |||
| Inline styles for the root. |
firstContentReactNodeContent shown at rest.
secondContentReactNodeContent that builds in pixel by pixel.
pattern'pointer' | 'random' | 'center' | 'edges' | 'left-to-right' | 'right-to-left' | 'top-to-bottom' | 'bottom-to-top' | 'diagonal' | 'spiral'Order the pixels arrive in. Pointer starts the wave where the cursor enters, leaves or clicks.
'pointer'pixelSizenumberEdge length of each pixel in px. Grows automatically when the grid would pass 600 pixels.
48gapnumberSpace between pixels in px while they grow.
pixelRadiusnumberCorner rounding of the pixels while they grow, as a percentage. 50 starts them as dots.
pixelScalenumberSize each pixel pops in at, from 0 to grow out of nothing to 0.9 for a hard pop.
pixelSpinnumberDegrees each pixel turns as it grows in.
durationnumberTime in ms the wave takes to cross the content.
400pixelDurationnumberTime in ms a single pixel takes to grow.
350randomnessnumberNoise mixed into the pattern, from 0 for a clean wave to 1 for a scatter.
0.2bouncenumberHow far each pixel overshoots before it settles, from 0 to 1.
0.3trigger'hover' | 'click' | 'none'What starts the swap. With none, drive it with active.
'hover'introbooleanBuilds the first content in from pixels on mount.
initialActivebooleanStarts on the second content.
activebooleanControls which content shows. Pair it with onActiveChange.
onActiveChange(active: boolean) => voidCalled when the trigger asks to swap.
onComplete(active: boolean) => voidCalled when a swap finishes.
aspectRatiostringAspect ratio of the root.
'16 / 10'Extra class names for the root.
Inline styles for the root.



