12
4
129
Colors
Count
8
Size
14px
Width
2px
Distance
30px
Duration
500ms
Randomness
0.2
Gravity
0
Spread
360°
Direction
0°
Glow
0

More cursor effects in Pro

Cursor trails and pointer effects that give a site its own feel.

View all 19
21 properties
sparkColorstring | 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.
sparkCount8Number of sparks in each burst.
sparkSize14Length of each spark, in px.
sparkWidth2Thickness of each spark, in px.
sparkRadius30How far the sparks travel from the click, in px.
duration500Length 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.
randomness0.2Varies the angle, length and speed of each spark, from 0 to 1. 0 gives a perfect star.
gravityPulls the sparks down as they fly, from 0 to 2.
spread360Angle the sparks fan across, in degrees. 360 is a full circle.
directionWhere a partial spread points, in degrees. 0 is up and 90 is right.
glowSoft light around each spark, from 0 to 1.
ringAdds 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.
extraScaleMultiplies how far the sparks travel.
disabledStops 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.
sparkColorstring | string[]

Color of the sparks. Pass a list to mix colors through each burst.

Default'#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.

Default'line'
sparkCountnumber

Number of sparks in each burst.

Default8
sparkSizenumber

Length of each spark, in px.

Default14
sparkWidthnumber

Thickness of each spark, in px.

Default2
sparkRadiusnumber

How far the sparks travel from the click, in px.

Default30
durationnumber

Length of a burst, in ms.

Default500
easing'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.

Default'ease-out'
randomnessnumber

Varies the angle, length and speed of each spark, from 0 to 1. 0 gives a perfect star.

Default0.2
gravitynumber

Pulls the sparks down as they fly, from 0 to 2.

spreadnumber

Angle the sparks fan across, in degrees. 360 is a full circle.

Default360
directionnumber

Where a partial spread points, in degrees. 0 is up and 90 is right.

glownumber

Soft light around each spark, from 0 to 1.

ringboolean

Adds 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.

Default'front'
extraScalenumber

Multiplies how far the sparks travel.

disabledboolean

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.

childrenReactNode

Content to wrap. Clicks anywhere inside it send sparks, which can spill past its edges.