Skip to content

    Browse components

    Expandable Cards

    A list of cards where the one you pick morphs into a detail view with a shared-layout spring, closing on Escape or backdrop click.

    Open
    Customize

    Installation

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

    Usage

    import { ExpandableCards } from "@/components/ui/expandable-cards";
    
    <ExpandableCards
      items={[
        { id: "tides", title: "Tides", subtitle: "38 min listen", image: "/tides.jpg", content: <p>…</p>, cta: "Play" },
      ]}
    />

    Props

    PropTypeDefaultDescription
    itemsReactNode—Array of { id, title, subtitle, image, content, cta?, onCta? }.
    radiusnumber20Corner radius in px.
    bouncenumber0.15Spring bounce of the morph.
    backdropbooleantrueDim and blur the list behind the open card.
    classNamestring—Extra classes for the root element.