More cursor effects in Pro
Cursor trails and pointer effects that give a site its own feel.
firstContent | ReactNode | Content shown by default. | |
secondContent | ReactNode | Content revealed by the transition. | |
gridSize | 10 | Number of pixels across the card. Rows follow so every pixel stays square. | |
pixelColor | '#ffffff' | Color of the pixels. Any CSS color works. | |
mosaic | Gives each pixel a slightly different tone of the pixel color, from 0 to 1. | ||
animationStepDuration | 0.4 | Seconds the pixels take to cover the card, and again to clear it. | |
pattern | 'random' | 'dither' | 'ripple' | 'wipe' | 'random' | Order the pixels appear in. Ripple spreads from the pointer and wipe sweeps in from the edge it crossed. |
randomness | 0.3 | Breaks up the ripple and wipe fronts, from 0 to 1. | |
pixelAnimation | 'pop' | 'grow' | 'fade' | 'pop' | How each pixel appears and disappears. |
pixelShape | 'square' | 'rounded' | 'circle' | 'square' | Shape of the pixels while the transition runs. They merge into a solid cover at the midpoint. |
gap | Space between pixels in pixels. | ||
fps | Caps how often the pixels redraw for a choppy retro feel. 0 redraws every frame. | ||
trigger | 'hover' | 'click' | 'hover' | What starts the transition. |
active | Controls the state from outside. Pair it with onActiveChange. | ||
once | Keeps the second content once it has been revealed. | ||
onActiveChange | (active: boolean) => void | Called when hover, focus or a click asks for the other content. | |
aspectRatio | '100%' | Height of the card. Percentages work like padding-top ('125%'), anything else is a CSS ratio ('4 / 5'). | |
| Extra class names for the card. | |||
| Inline styles for the card. |
firstContentReactNodeContent shown by default.
secondContentReactNodeContent revealed by the transition.
gridSizenumberNumber of pixels across the card. Rows follow so every pixel stays square.
10pixelColorstringColor of the pixels. Any CSS color works.
'#ffffff'mosaicnumberGives each pixel a slightly different tone of the pixel color, from 0 to 1.
animationStepDurationnumberSeconds the pixels take to cover the card, and again to clear it.
0.4pattern'random' | 'dither' | 'ripple' | 'wipe'Order the pixels appear in. Ripple spreads from the pointer and wipe sweeps in from the edge it crossed.
'random'randomnessnumberBreaks up the ripple and wipe fronts, from 0 to 1.
0.3pixelAnimation'pop' | 'grow' | 'fade'How each pixel appears and disappears.
'pop'pixelShape'square' | 'rounded' | 'circle'Shape of the pixels while the transition runs. They merge into a solid cover at the midpoint.
'square'gapnumberSpace between pixels in pixels.
fpsnumberCaps how often the pixels redraw for a choppy retro feel. 0 redraws every frame.
trigger'hover' | 'click'What starts the transition.
'hover'activebooleanControls the state from outside. Pair it with onActiveChange.
oncebooleanKeeps the second content once it has been revealed.
onActiveChange(active: boolean) => voidCalled when hover, focus or a click asks for the other content.
aspectRatiostringHeight of the card. Percentages work like padding-top ('125%'), anything else is a CSS ratio ('4 / 5').
'100%'Extra class names for the card.
Inline styles for the card.





