Padding
100px
Strength
2
Stiffness
170
Damping
16
Tilt
6°
Scale

More cursor effects in Pro

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

View all 19
14 properties
childrenReactNodeThe content that moves toward the cursor.
padding100Distance in pixels around the element where the cursor starts to pull it.
magnetStrength2How far the element follows the cursor. The offset is divided by this value, so 1 follows the cursor and higher values move less.
exclusiveWhen 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.
maxOffsetCaps how far the element can move from its resting place, in pixels.
tiltMaximum 3D tilt toward the cursor, in degrees.
scaleScale 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.
disabledTurns 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.
wrapperClassNameClass name for the outer wrapper, which stays in place.
innerClassNameClass name for the inner element that moves.
Inline styles for the outer wrapper.
childrenReactNode

The content that moves toward the cursor.

paddingnumber

Distance in pixels around the element where the cursor starts to pull it.

Default100
magnetStrengthnumber

How far the element follows the cursor. The offset is divided by this value, so 1 follows the cursor and higher values move less.

Default2
exclusiveboolean

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'

Limits the movement to one axis.

Default'both'
maxOffsetnumber

Caps how far the element can move from its resting place, in pixels.

tiltnumber

Maximum 3D tilt toward the cursor, in degrees.

scalenumber

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

Default{ stiffness: 170, damping: 16, mass: 1 }
disabledboolean

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.

wrapperClassNamestring

Class name for the outer wrapper, which stays in place.

innerClassNamestring

Class name for the inner element that moves.

Inline styles for the outer wrapper.