More cursor effects in Pro
Cursor trails and pointer effects that give a site its own feel.
sparkColor | string | string[] | '#fff' | Color of the sparks. Pass a list to mix colors through each burst. |
shape | 'line' | 'streak' | 'dot' | 'star' | 'line' | Look of each spark: a short dash, a comet with a fading tail, a round dot, or a twinkling star. |
sparkCount | 8 | Number of sparks in each burst. | |
sparkSize | 14 | Length of each spark, in px. | |
sparkWidth | 2 | Thickness of each spark, in px. | |
sparkRadius | 30 | How far the sparks travel from the click, in px. | |
duration | 500 | Length of a burst, in ms. | |
easing | 'ease-out' | 'ease-in-out' | 'ease-in' | 'linear' | 'spring' | 'ease-out' | How the sparks slow down as they fly out. Spring overshoots a little and settles back. |
randomness | 0.2 | Varies the angle, length and speed of each spark, from 0 to 1. 0 gives a perfect star. | |
gravity | Pulls the sparks down as they fly, from 0 to 2. | ||
spread | 360 | Angle the sparks fan across, in degrees. 360 is a full circle. | |
direction | Where a partial spread points, in degrees. 0 is up and 90 is right. | ||
glow | Soft light around each spark, from 0 to 1. | ||
ring | Adds a thin ring that expands from the click. | ||
layer | 'front' | 'back' | 'front' | Draws the sparks over your content, or behind it so they burst out around buttons and cards. |
extraScale | Multiplies how far the sparks travel. | ||
disabled | Stops new bursts. | ||
ref | { spark: (x?: number, y?: number) => void } | Call spark() to fire a burst from code. x and y are in px from the top left; it centers without them. | |
| Extra class names for the wrapper. | |||
| Inline styles for the wrapper. | |||
children | ReactNode | Content to wrap. Clicks anywhere inside it send sparks, which can spill past its edges. |
sparkColorstring | string[]Color of the sparks. Pass a list to mix colors through each burst.
'#fff'shape'line' | 'streak' | 'dot' | 'star'Look of each spark: a short dash, a comet with a fading tail, a round dot, or a twinkling star.
'line'sparkCountnumberNumber of sparks in each burst.
8sparkSizenumberLength of each spark, in px.
14sparkWidthnumberThickness of each spark, in px.
2sparkRadiusnumberHow far the sparks travel from the click, in px.
30durationnumberLength of a burst, in ms.
500easing'ease-out' | 'ease-in-out' | 'ease-in' | 'linear' | 'spring'How the sparks slow down as they fly out. Spring overshoots a little and settles back.
'ease-out'randomnessnumberVaries the angle, length and speed of each spark, from 0 to 1. 0 gives a perfect star.
0.2gravitynumberPulls the sparks down as they fly, from 0 to 2.
spreadnumberAngle the sparks fan across, in degrees. 360 is a full circle.
360directionnumberWhere a partial spread points, in degrees. 0 is up and 90 is right.
glownumberSoft light around each spark, from 0 to 1.
ringbooleanAdds a thin ring that expands from the click.
layer'front' | 'back'Draws the sparks over your content, or behind it so they burst out around buttons and cards.
'front'extraScalenumberMultiplies how far the sparks travel.
disabledbooleanStops new bursts.
ref{ spark: (x?: number, y?: number) => void }Call spark() to fire a burst from code. x and y are in px from the top left; it centers without them.
Extra class names for the wrapper.
Inline styles for the wrapper.
childrenReactNodeContent to wrap. Clicks anywhere inside it send sparks, which can spill past its edges.



