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.
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | DepthLayer elements to stack. | |
| strength | number | 40 | Max layer shift in px at depth = 1. |
| tilt | number | 8 | Tilt of the whole stack in degrees. |
| perspective | number | 1000 | CSS perspective distance in px. Lower values look more dramatic. |
| className | string | Extra classes added to the outer element. |
| Prop | Type | Default | Description |
|---|---|---|---|
| depth | number | 0.5 | How far the layer sits from the back, from 0 to 1. Higher moves more. |
| children | ReactNode | Content shown in this layer. | |
| className | string | Extra classes added to the layer. |