Layered depth
Four ParallaxMousemove.Layers with increasing xFactor/yFactor (0.02 → 0.14). Bigger factors move farther, creating parallax depth.
Positive vs negative factors
Positive factors move the layer away from the cursor; negative factors move it with the cursor. Move left/right and watch the two cards separate.
Live springSettings
The config.springSettings on the card below is driven by these sliders. Low stiffness / low damping = floaty & bouncy; high stiffness = snappy.
{ stiffness: 170, damping: 26 }disabled prop
Toggling disabled freezes the layer in place — the mousemove listener is torn down while disabled.
fullHeight container
With fullHeight, the container is sized to the window height and updates on resize. Toggle it and note the height readout.
Named export: ParallaxLayer
The layer is also exported as ParallaxLayer. This card uses import { ParallaxLayer } directly instead of ParallaxMousemove.Layer.
prefers-reduced-motion
Layers automatically freeze when the OS “reduce motion” setting is on — no extra code needed. Current detected state shown below.