Hero Templates

Depth Stage

A DOM hero stage where any children become parallax layers in real 3D. Pointer-tracked tilt, spring physics, a following spotlight, depth of field, staggered entrance, zero canvas.

Install

bun add motion

Props

PropTypeDefaultDescription
accentColorstring (hex)"#a855f7"Accent wash behind the layers.
depthnumber40Full-stack parallax travel at the deepest layer.
tiltMaxnumber3.5Stage tilt at the pointer extremes.
entrancebooleantrueStagger the layers up on mount.
floatbooleantrueSlow CSS drift on every layer while idle.
spotlightbooleantrueA pointer-following light across the stage.
depthOfFieldbooleantrueBlur the far layers the way a lens would.

What It Demonstrates

Parallax
Background and foreground move at different speeds while scrolling, creating depth.
Spring
Motion driven by physics (tension, mass, damping) rather than a set duration.
Stagger
Animate several items one after another with a small delay between each, creating a cascade.
Reduced motion
Respecting the user's prefers-reduced-motion setting by toning down or removing motion.
Hover effect
Visual change when the cursor moves over an element.

Related Components

Appears In