Skip to content

    Browse components

    Tilt Card

    3D perspective tilt that follows the pointer, with an optional glare.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/tilt-card

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/tilt-card.json

    Usage

    import { TiltCard } from "@/components/ui/tilt-card";
    
    <TiltCard className="rounded-2xl">
      <img src="/cover.jpg" alt="" className="rounded-2xl" />
    </TiltCard>

    Props

    PropTypeDefaultDescription
    childrenReactNode—Card content.
    maxTiltnumber12Max rotation in degrees.
    scalenumber1.04Scale while hovered.
    glarebooleantrueShow a light glare.
    classNamestring—Extra classes for the root element.