Hover the card. Layers float at different depths and a glare follows the pointer.
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 | Content shown on the card. | |
| max | number | 12 | Max tilt in degrees. |
| perspective | number | 900 | Perspective distance in px. Lower = more dramatic. |
| glare | boolean | true | Show the specular glare that follows the pointer. |
| depthScale | number | 1 | Scale multiplier applied to all TiltLayer z offsets. |
| containerClassName | string | Extra classes added to the outer perspective wrapper. className styles the card itself. |
| Prop | Type | Default | Description |
|---|---|---|---|
| z | number | 40 | translateZ in px (scaled by the card's depthScale). |
3D Card Tilt Effect in React with Tailwind and Framer Motion