Components / Cards
Tilt Card
A card that tilts in 3D toward the pointer, with a soft glare that follows it.
Aurora Pass
Tilt me around. The glare follows your cursor.
Installation
Requires React 18+ and Tailwind CSS.
- 1
Install dependencies
$ npm install motion - 2
Add the component
Copy the code from the Code tab above into
components/ui/tilt-card.tsx. - 3
Use it
example.tsximport { TiltCard } from "@/components/ui/tilt-card"; export default function TiltCardDemo() { return ( <TiltCard className="w-full max-w-xs"> <div className="mb-4 h-28 rounded-xl bg-gradient-to-br from-orange-400 via-rose-500 to-fuchsia-600" /> <h3 className="text-lg font-semibold text-zinc-900 dark:text-white">Aurora Pass</h3> <p className="mt-1 text-sm text-zinc-600 dark:text-zinc-400">Tilt me around. The glare follows your cursor.</p> </TiltCard> ); }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| maxTilt | number | 12 | Maximum tilt in degrees. |
| glare | boolean | true | Show a light glare that follows the pointer. |
| className | string | — | Classes for the outer wrapper (e.g. width). |