More cursor effects in Pro
Cursor trails and pointer effects that give a site its own feel.
children | ReactNode | The content that moves toward the cursor. | |
padding | 100 | Distance in pixels around the element where the cursor starts to pull it. | |
magnetStrength | 2 | How far the element follows the cursor. The offset is divided by this value, so 1 follows the cursor and higher values move less. | |
exclusive | When several magnets are in range, only the nearest exclusive one is pulled. Turn it off to let a group, like dock icons, lean toward the cursor together. | ||
axis | 'both' | 'x' | 'y' | 'both' | Limits the movement to one axis. |
maxOffset | Caps how far the element can move from its resting place, in pixels. | ||
tilt | Maximum 3D tilt toward the cursor, in degrees. | ||
scale | Scale of the element while the cursor pulls it. | ||
spring | { stiffness?: number; damping?: number; mass?: number } | { stiffness: 170, damping: 16, mass: 1 } | Spring that drives the movement. Higher stiffness reacts faster, lower damping lets it overshoot and wobble back. |
disabled | Turns the effect off and lets the element spring back to rest. | ||
onActiveChange | (active: boolean) => void | Called when the cursor enters or leaves the magnetic area. The wrapper also gets a data-magnet-active attribute. | |
wrapperClassName | Class name for the outer wrapper, which stays in place. | ||
innerClassName | Class name for the inner element that moves. | ||
| Inline styles for the outer wrapper. |
childrenReactNodeThe content that moves toward the cursor.
paddingnumberDistance in pixels around the element where the cursor starts to pull it.
100magnetStrengthnumberHow far the element follows the cursor. The offset is divided by this value, so 1 follows the cursor and higher values move less.
2exclusivebooleanWhen several magnets are in range, only the nearest exclusive one is pulled. Turn it off to let a group, like dock icons, lean toward the cursor together.
axis'both' | 'x' | 'y'Limits the movement to one axis.
'both'maxOffsetnumberCaps how far the element can move from its resting place, in pixels.
tiltnumberMaximum 3D tilt toward the cursor, in degrees.
scalenumberScale of the element while the cursor pulls it.
spring{ stiffness?: number; damping?: number; mass?: number }Spring that drives the movement. Higher stiffness reacts faster, lower damping lets it overshoot and wobble back.
{ stiffness: 170, damping: 16, mass: 1 }disabledbooleanTurns the effect off and lets the element spring back to rest.
onActiveChange(active: boolean) => voidCalled when the cursor enters or leaves the magnetic area. The wrapper also gets a data-magnet-active attribute.
wrapperClassNamestringClass name for the outer wrapper, which stays in place.
innerClassNamestringClass name for the inner element that moves.
Inline styles for the outer wrapper.



