Tilt Card
ProTilts in 3D toward the pointer with an optional glare.
Installation
pnpm dlx shadcn@latest add @viewport/tilt-card
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| max | numberMaximum tilt in degrees. | 10 |
| glare | booleanShow a glare that follows the pointer. | true |
| className | string | — |
| children* | React.ReactNode | — |
Accessibility
- Stays flat for touch input and under reduced motion.
- Glare layer is aria-hidden.