Loading preview
Depth Card
CardsA card that tilts toward the pointer while its layers rise off the surface, each to its own depth.
A card that tilts in 3D toward the pointer, with a glare that follows it.
npx shadcn@latest add @venusui/tilt-cardRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/tilt-card.tsxThe code behind the preview above.
tilt-card-demo.tsx
import { TiltCard } from "@/components/ui/tilt-card"
export default function TiltCardDemo() {
return (
<TiltCard className="w-72 p-6">
<div className="h-32 rounded-lg bg-linear-to-br from-violet-500 to-sky-400" />
<p className="mt-4 font-medium">Move your pointer over me</p>
<p className="mt-1 text-sm text-muted-foreground">The card tilts toward it and catches the light.</p>
</TiltCard>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
| max | number | 10 | Largest tilt in degrees. |
| glare | boolean | true | Show a glare that follows the pointer. |
All <div> props, including className.
max small (6–12) so text stays readable.perspective-[900px].Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.A card that tilts toward the pointer while its layers rise off the surface, each to its own depth.
A payment card with a holographic foil that follows the pointer, and a flip to the back on click.
Cards arranged in a ring that turns in 3D, with buttons, arrow keys and announcements.