Skip to content
VenusUI
Get started

Tilt Card

A card that tilts in 3D toward the pointer, with a glare that follows it.

Preview

Installation

npx shadcn@latest add @venusui/tilt-card

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/tilt-card.tsx

Usage

The 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>
  )
}

API reference

PropTypeDefaultDescription
maxnumber10Largest tilt in degrees.
glarebooleantrueShow a glare that follows the pointer.

All <div> props, including className.

Requirements

  • React 19 and Tailwind CSS v4.

Customization

  • Keep max small (6–12) so text stays readable.

Accessibility

  • Touch and keyboard users see a normal card.
  • Stays flat with reduced motion.

Troubleshooting

The tilt looks flat.
Don’t remove the wrapper with perspective-[900px].
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (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 found
Run npx shadcn@latest init in your project first.
Loading preview

A card that tilts toward the pointer while its layers rise off the surface, each to its own depth.

Loading preview

A payment card with a holographic foil that follows the pointer, and a flip to the back on click.

Loading preview

Cards arranged in a ring that turns in 3D, with buttons, arrow keys and announcements.