Skip to content

    Browse components

    Drift Card

    A card whose photo, text and chips drift at different parallax depths as the pointer moves, with a soft tilt and glare.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/drift-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/drift-card.json

    Usage

    import { DriftCard } from "@/components/ui/drift-card";
    
    <DriftCard image="/ridge.jpg" eyebrow="Field notes" title="Where the fog meets the ridge" description="A three-day traverse." />

    Props

    PropTypeDefaultDescription
    imagestring—Background image URL.
    titlestring"Where the fog meets the ridge"Card title.
    descriptionstring"A three-day traverse along the northern coast, shot on medium format."Supporting text.
    eyebrowstring"Field notes · 04"Floating chip label.
    childrenReactNode—Extra foreground content, e.g. a button.
    depthnumber24Max drift of the nearest layer in px.
    tiltnumber8Max tilt in degrees.
    widthnumber320Card width in px.
    heightnumber420Card height in px.
    classNamestring—Extra classes for the root element.