Skip to content
caliper ui pro docs

Layer parallax

A composition of layers that shift against each other as the mouse moves, each by its own depth, with the whole scene tilting no more than 5 degrees. It explains how a screen is built: the grid behind, the card on it, the chip and the toast in front. It is for docs and demonstration stages, never for controls or moving text.

Pro
Weekly signups
Mon to Sat
+12%
Deploy finished

Mouse only. Touch, keyboard and reduced motion see the still composition.

When to use

  • Docs and landing sections that show the layers of a screen or a component.
  • A demonstration stage that needs a little life without autoplay.

When not to use

  • Anything people must click or read while it moves.
  • Hero art for its own sake; a still image says the same.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/layer-parallax

Adds its 9 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

LayerParallax

14 props
PropTypeDefaultDescription
label *string—Accessible name of the composition.
children *ReactNode—`Layer` children, back to front.
intensitynumber—Largest shift in pixels for a layer at depth 1, 0 to 16. Controlled when set.
defaultIntensitynumber10
onIntensityChange((intensity: number) => void)—
enabledboolean—Whether the pointer moves the layers. Controlled when set.
defaultEnabledbooleantrue
onEnabledChange((enabled: boolean) => void)—
controlsbooleantrueShow the switch and the intensity slider.
statusDepthStatus"ready"
messagesDepthMessages—
onRetry(() => void)—
disabledboolean—
classNamestring—

Layer

2 props

Also accepts the native props of its root element and a ref.

PropTypeDefault
depth *number—
fillboolean—

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

It exposes group semantics, with aria-label and aria-valuetext kept in step with state.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/layer-parallax.md

The index of every part is at /llms.txt.

More in Surfaces