A 3D card that tilts toward the pointer, with an optional moving glare.
A card that tilts toward the cursor while its layers float at different depths, so each moves at its own speed.
Customize
Usage
import { DepthCard, DepthLayer } from "@/components/motionkit/depth-card";
<DepthCard className="w-72">
<DepthLayer depth={0}>
<img src="/cover.jpg" alt="" className="rounded-t-2xl" />
</DepthLayer>
<DepthLayer depth={60}>
<img src="/product.png" alt="Launch kit" />
</DepthLayer>
<DepthLayer depth={30} className="p-5">
<h3>Launch kit</h3>
</DepthLayer>
</DepthCard>Motion
The exact curves this component runs, plotted with Motion's own maths.
Tilt
Pointer moves over the card
Hero product cards, game or event tickets and showcase tiles where layered artwork (a background, a product, a label) should separate as the card moves.
The card tilts like the Tilt Card, but keeps transform-style: preserve-3d so its children live in real 3D space. Each DepthLayer is pushed forward with translateZ by its depth prop, so as the card rotates, nearer layers shift further than deeper ones. That difference is parallax, and it is what reads as depth. The card skips overflow: hidden on purpose, because clipping would flatten the layers.
| Prop | Type | Default | Description |
|---|---|---|---|
| maxTilt | number | 12 | Maximum rotation in degrees. |
| glare | boolean | true | Show a light reflection that follows the pointer. |
| <DepthLayer depth> | number | 30 | How far a layer floats above the card, in pixels. Higher layers move more. |
How we audit: the WCAG 2.2 animation checklist and respecting reduced motion in React.
Yes. The file starts with "use client", so you can import it straight into a Server Component page or layout. It works in Vite as is, and in Astro as a React island.
Only the motion package, beside React and Tailwind CSS v4. There is no MotionKit package and no Tailwind config to add.
Subscribers can, with npx shadcn@latest add @motionkit/depth-card once their token is set up. With a free account, copy the source from this page: it's one file in components/motionkit.
Yes, with a free MotionKit account. The live preview and playground are open to everyone; sign up (no card needed) to copy its source. Commercial use needs MotionKit Plus.
With reduced motion on, the card does not tilt, so the layers sit still.
A 3D card that tilts toward the pointer, with an optional moving glare.
A metallic rainbow foil that shifts and shimmers as the pointer moves, like a holographic trading card.
A card with a soft glow that tracks the pointer across its surface.
Launch kit
Tilt me to see the layers.
Depth Card is usually a Plus component. Create a free account and its source is yours, along with your starred kit and copy history on every device.
Customize
Usage
import { DepthCard, DepthLayer } from "@/components/motionkit/depth-card";
<DepthCard className="w-72">
<DepthLayer depth={0}>
<img src="/cover.jpg" alt="" className="rounded-t-2xl" />
</DepthLayer>
<DepthLayer depth={60}>
<img src="/product.png" alt="Launch kit" />
</DepthLayer>
<DepthLayer depth={30} className="p-5">
<h3>Launch kit</h3>
</DepthLayer>
</DepthCard>Motion
The exact curves this component runs, plotted with Motion's own maths.
Tilt
Pointer moves over the card
Launch kit
Tilt me to see the layers.