Theme
Install with your agentnpx shadcn@4.23.1 add @goop/trail-card

Card

Free

A framed surface that holds one piece of content or a list of settings rows, for React and Tailwind CSS. Free, MIT.

Pick any look of the card: the plain outline card or the tile — retitle it, make the whole card one button (hover, press, focus, disabled; a press counts) — the list card (CardList: open a folder, take the rows away to see its empty row and make one from it, put a CardContent above them), or the theme’s own frames as its docs stage draws them (on Trail the outline frame round the theme’s rows: settings, switches, tile rows, sessions, the status card, the profile form …; on Meadow the list, the panel, the tray, the cover, the promo and the drafted email and event), with Disabled holding their controls. Nothing is saved: a press is only counted, and the rows’ switches and selects hold their own values.

When to use

  • A framed surface that holds one piece of content or a list of settings rows.

When not to use

  • To set several cards out in a grid, use CardGrid.

Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Card on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing.

Terminal
npx shadcn@4.23.1 add @goop/trail-card
PROMPT
Add the Goop Card to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { Card, CardAction, CardText, CardHeader, CardMedia, CardContent, CardTitle, CardDescription, CardFooter } from '@/components/ui/goop/card';
import { CardList } from '@/components/ui/goop/card-list';
import { Item, ItemOverlay, ItemContent, ItemTitle, ItemDescription } from '@/components/ui/goop/item';
import { ProgressCircle } from '@/components/ui/goop/progress-circle';
import { Button } from '@/components/ui/goop/button';

<>
  <Card variant="outline">
    <CardHeader>
      <CardTitle asChild>
        <h3>Shared folders</h3>
      </CardTitle>
      <CardDescription>Folders the team can open</CardDescription>
    </CardHeader>
    <CardContent>Shared last week.</CardContent>
    <CardList aria-label="Shared folders" empty={{ title: 'No folders shared yet' }}>
      <Item asChild>
        <li>
          <ItemOverlay asChild>
            <a href="/folders/notes" aria-label="Open Field notes" />
          </ItemOverlay>
          <ItemContent>
            <ItemTitle>Field notes</ItemTitle>
            <ItemDescription>Notes from the last visit</ItemDescription>
          </ItemContent>
        </li>
      </Item>
    </CardList>
  </Card>
  <Card asChild>
    <button type="button" onClick={openSettings}>
      <CardText>
        <CardTitle>Workspace settings</CardTitle>
        <CardDescription>Name, address and defaults</CardDescription>
      </CardText>
    </button>
  </Card>
  <Card variant="outline">
    <CardHeader>
      <CardMedia>
        <ProgressCircle
          size="lg"
          value={42}
          max={50}
          role="meter"
          aria-label="Seats"
          aria-valuetext="42 of 50 seats taken"
        />
      </CardMedia>
      <CardTitle asChild>
        <h3>Seats</h3>
      </CardTitle>
      <CardDescription>42 of 50 taken this month</CardDescription>
      <CardAction>
        <Button variant="ghost" shape="pill" size="lg" onClick={openSettings}>
          Manage seats
        </Button>
      </CardAction>
    </CardHeader>
  </Card>
</>
  • Fits: states, account, flow, list, overview, record, settings (their recipes).
  • CardText is the tile's column of words, with no inside of its own: the tile holds it 12 px in. An outline card's own content (words, MetaFacts, meters) goes under its CardHeader in a CardContent, never in a CardText or a hand-padded div. An outline card's Item rows go in a CardList (each an Item asChild on an li; a whole row as a link: ItemOverlay asChild round the a), never a bare ul; with no rows, its empty words show. An outline card's Table goes straight under its CardHeader, never in a CardContent: it takes the card's gutter by itself. A settings card's rows are Fields, not Items: Card variant="outline" asChild round a ul, each a Field as="li", no CardList.
  • More on where it goes: card--options.md
  • height, width, padding, gap, corner, border, background, shadow, text: add no class for these.

API reference

Options
OptionTypeWhat it does
variantdefault | outline = default
asChild?boolean = falseDraw the card on your own element (the button or link a tile is).
Parts
PartWhat it is
CardActionThe tile's action at its top end (12 px in from the top and the end, its items 6 px apart); its props: card--action.md
CardTextThe tile's column of words
CardHeaderThe header inside the list frame, above its rows (a header, the banner)
CardMediaThe header's picture at its start
CardContentThe card's padded body
CardTitleThe title; takes asChild
CardDescriptionA muted line or two under the card's title that says what the card holds
CardFooterA small grey line of words, not a footer bar
  • Class recipes (cva): cardVariants (Card)

CardAction

The tile's action at its top end (12 px in from the top and the end, its items 6 px apart).

TSX
import { CardAction } from '@/components/ui/goop/card';

Options

  • reveal?: boolean = false — Hidden at rest, shown under the pointer, the press or the keyboard's focus on the card; shown on a touch screen.

Card: every option

TSX
import { Card } from '@/components/ui/goop/card';

Compose

  • A CardHeader holds only its parts, straight in it (no div round the title and description): a CardMedia first (a ring, an avatar or an icon tile), its CardTitle, a CardDescription and its action (a CardAction or a Button). CardHeader is the outline card's: in a tile its title stands 16 px further in than the tile's words. A whole tile as a button: Card asChild round the caller's button type="button", a CardText in it. A whole outline card as a button: Card variant="outline" asChild round the button, its words in a CardText with className="p-4 max-narrow:p-2.5" (no CardHeader); never round an outline card whose rows hold controls of their own. A border of your own in place of the card's edge takes it away: ring-0 dark:ring-0.

Options

Accessibility

  • hover, active, focus-visible: the browser's own (:hover, :active, :focus-visible): write nothing

Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

goop.so/themes/trail/components/card.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add @goop/trail-card

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.