Skip to content

    Browse components

    Motion Cards

    A card grid that springs in with a stagger and, when filtered by tag, shrinks leaving cards away while the rest glide into their new cells.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/motion-cards

    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/motion-cards.json

    Usage

    import { MotionCards } from "@/components/ui/motion-cards";
    
    <MotionCards
      items={[
        { id: "1", title: "Designing calm interfaces", image: "/a.jpg", tags: ["Design"] },
        { id: "2", title: "Edge caching in practice", image: "/b.jpg", tags: ["Engineering"] },
      ]}
    />

    Props

    PropTypeDefaultDescription
    itemsReactNode—Array of { id, title, description?, image?, eyebrow?, tags }.
    columnsnumber4Grid columns on wide screens.
    staggernumber0.06Seconds between card entrances.
    bouncenumber0.25Spring bounce for entrances and reordering.
    showFilterbooleantrueShow the tag filter bar.
    allLabelstring"All"Label of the show-everything filter; empty hides it.
    onFilterChangeReactNode—Called with the active tag, or null for all.
    classNamestring—Extra classes for the root element.