Tilt Card

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.

TiltCard props

PropTypeDefaultDescription
childrenReactNodeContent shown on the card.
maxnumber12Max tilt in degrees.
perspectivenumber900Perspective distance in px. Lower = more dramatic.
glarebooleantrueShow the specular glare that follows the pointer.
depthScalenumber1Scale multiplier applied to all TiltLayer z offsets.
containerClassNamestringExtra classes added to the outer perspective wrapper. className styles the card itself.

TiltLayer props

PropTypeDefaultDescription
znumber40translateZ in px (scaled by the card's depthScale).

Read the guide

3D Card Tilt Effect in React with Tailwind and Framer Motion

More components

Guides

Start

Cards

Scenes

Controls & text

Buttons

More cards

UI elements

Form controls

App components

Text & backgrounds

Showpieces

Blocks