Tilt Card
tilt-cardA card that leans toward the pointer in 3D with a highlight sliding across it, then settles flat when the pointer leaves. It is driven by CSS variables with no re-renders, and it stays flat for touch and reduced motion.
import { TiltCard } from "@/components/forme/tilt-card/tilt-card";
const places = [
{ src: "/images/dunes.webp", title: "Erg Chebbi", meta: "Morocco · 31°N" },
{ src: "/images/lake.webp", title: "String Lake", meta: "Wyoming · 43°N" },
];
export function TiltCardDemo() {
return (
<div className="grid w-full max-w-xl gap-5 sm:grid-cols-2">
{places.map((place) => (
<TiltCard key={place.title}>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img src={place.src} alt="" className="aspect-[4/5] w-full object-cover" />
<div className="absolute inset-x-0 bottom-0 bg-black/45 p-4 text-white backdrop-blur-sm">
<p className="text-title-2-semibold">{place.title}</p>
<p className="text-caption-1-regular text-white/75">{place.meta}</p>
</div>
</TiltCard>
))}
</div>
);
}Install
Adds the component, its registry dependencies, and the token stylesheet you import once.
Usage
import { TiltCard } from "@/components/forme/tilt-card/tilt-card";
<TiltCard max={8} glare>
<img src="/cover.jpg" alt="The album cover" className="rounded-2xl" />
</TiltCard>When to use
Reach for it
- A single showcase object, like a product shot, a card design or an album cover.
Use something else
- Grids of interactive cards; tilting targets are harder to click.
- Anything with text people need to read while it moves.
API reference
Read from the source, so it is the API of the file you install. A prop marked * is required.
TiltCard
A card that leans toward the pointer, like a print held up to the light.
| Prop | Type | Default | Description |
|---|---|---|---|
max | number | 8 | Maximum tilt in degrees at the card's edge. |
glare | boolean | true | Adds a highlight that slides across the card as it tilts. |
Also takes every prop of <div> attributes.
Accessibility
- The glare layer is decorative and hidden from assistive technology.
Motion
- Rotation and glare are custom properties set on pointer move and smoothed by a CSS transition, so tilting costs no renders.
- It settles back flat when the pointer leaves;
maxcaps the lean in degrees. - Reduced motion gives a flat card.
Responsive behaviour
- Only a mouse tilts it. Under a finger, tilting would fight the scroll, so touch gets a flat card.
Related


Confirm Button
A destructive button that grows into its own confirmation on a spring, so the question appears where you are looking. Focus lands on Cancel, Esc or clicking away disarms it, and the confirm button shows a spinner while the action runs.
motion

Dynamic Island
A black pill that morphs on a spring to fit whatever it is showing: a timer, a call, a song or a notification. Content swaps through a short blur crossfade, the corners never stretch mid-morph, and each change is announced politely.
motion

Marquee
A seamless, endlessly scrolling row for logos, photos or testimonials. It pauses on hover and focus, screen readers hear the content once, and reduced motion turns it into a row you scroll by hand. Pure CSS.
motion

