Depth Stack

Move the pointer across the scene. Closer layers shift more.

Install it the shadcn way: copy the source file into your project. It uses CSS 3D, Tailwind CSS v4 and Framer Motion, no WebGL.

DepthStack props

PropTypeDefaultDescription
childrenReactNodeDepthLayer elements to stack.
strengthnumber40Max layer shift in px at depth = 1.
tiltnumber8Tilt of the whole stack in degrees.
perspectivenumber1000CSS perspective distance in px. Lower values look more dramatic.
classNamestringExtra classes added to the outer element.

DepthLayer props

PropTypeDefaultDescription
depthnumber0.5How far the layer sits from the back, from 0 to 1. Higher moves more.
childrenReactNodeContent shown in this layer.
classNamestringExtra classes added to the layer.

More components

Guides

Start

Cards

Scenes

Controls & text

Buttons

More cards

UI elements

Form controls

App components

Text & backgrounds

Showpieces

Blocks