Tilt Card

Motion

A React card that tilts toward the pointer in 3D with a moving glare and parallax children marked data-depth, springs flat on leave and stays still for reduced motion.

src/registry/premium/tilt-card.tsx/r/tilt-card.json

Installation#

bash
npx shadcn@latest add @minidev/tilt-card

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/tilt-card.json

Usage#

tsx
import { TiltCard } from "@/components/ui/tilt-card"

export function Example() {
  return <TiltCard />
}

API reference#

TiltCard props
PropTypeDefault
childrenReact.ReactNode-
maxTiltnumber12
glarenumber0.6
perspectivenumber900
parallaxnumber10
classNamestring-

Dependencies#

npm

lucide-reactmotion

Built from

All Animated React components