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

Card

Free

A framed surface that holds one piece of content, a list of rows or a section's words, 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, a list of rows or a section's words.

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/meadow-card
PROMPT
Add the Goop Card to this project. The install steps are at https://goop.so/docs/install.md

Usage

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

import {
  Card,
  CardAction,
  CardContent,
  CardDescription,
  CardHeader,
  CardHeaderButton,
  CardMedia,
  CardSheet,
  CardText,
  CardTitle,
} from '@/components/ui/goop/card';
import { IconButtonIcon } from '@/components/ui/goop/icon-button';

function SurveyTile() {
  return (
    <Card asChild>
      <a href="#ridge">
        <CardText>
          <CardTitle>Ridge survey</CardTitle>
        </CardText>
      </a>
    </Card>
  );
}

function NewEvent({ onAdd, onClose }: { onAdd(): void; onClose(): void }) {
  return (
    <Card variant="tray" size="sm">
      <CardHeader>
        <CardMedia className="bg-fuchsia-fill">
          <IconButtonIcon icon="calendar" box={{ w: 10, h: 10 }} />
        </CardMedia>
        <CardTitle>Calendar</CardTitle>
        <CardAction>
          <CardHeaderButton onClick={onAdd}>Add to calendar</CardHeaderButton>
          <hr />
          <CardHeaderButton aria-label="Dismiss event" onClick={onClose}>
            <IconButtonIcon icon="x" box={{ w: 12, h: 12 }} />
          </CardHeaderButton>
        </CardAction>
      </CardHeader>
      <CardSheet>
        <CardContent>
          <span className="flex items-center gap-1.5">
            <span aria-hidden className="h-4 w-0.5 rounded-sm bg-icon" />
            <CardTitle>Planting day</CardTitle>
          </span>
          <CardDescription>Nov 21, 9–12</CardDescription>
          <CardDescription>Meet at the barn.</CardDescription>
          <span className="my-0.5">mira@example.com</span>
          <span className="my-0.5">Public · Busy</span>
        </CardContent>
      </CardSheet>
    </Card>
  );
}
  • Fits: states (its recipe).
  • The tile's words go in a CardText (CardTitle, CardDescription, CardFooter), its action in a CardAction. The panel's parts go straight in it, in their order: a CardHeader first when it has one, then CardLists and CardContents; its own words, facts or meters in a CardContent, never in a div padded by hand; a Table straight in it (never in a CardContent), where it takes the card's gutter by itself. A settings card's rows are Fields, not a CardList: Card variant="outline" asChild round a ul (or a ul straight in it, after its CardHeader), each a Field as="li"; the card sets each row 12 px in and rules them with its divider.
  • More on where it goes: card--options.md
  • height, width, padding, gap, corner, border, background, shadow, text, motion: add no class for these.

API reference

Options
OptionTypeWhat it does
variantdefault | outline | tray | filled | cover | promo = default
sizemd | sm = md
Parts
PartWhat it is
CardHeaderButtonA quiet button in a card's header strip; also takes type?: 'button' | 'submit' | 'reset' = 'button'; onClick?: (event: MouseEvent) => void; disabled?: boolean
CardActionThe tile's action at its top end (12 px in from the top and the end, its items 8 px apart); in a CardHeader, the header's action at its end, its items 12 px apart, centred on the title's line; its props: card--action.md
CardHeaderThe panel's header (a header) on the card fill, 12 px in on every side, 42 px tall for one line of words; its title at its start and its action at its end, 10 px apart, centred on the title's line
CardMediaA picture at the start of a CardList row or a CardHeader
CardSheetThe tray's raised sheet, under its header strip
CardContentThe panel's padded body
CardTitleThe title; takes asChild
CardDescriptionA muted line or two under the card's title that says what the card or the row holds
CardFooterA small grey line of words, not a footer bar
  • CardText
  • 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 8 px apart); in a CardHeader, the header's action at its end, its items 12 px apart, centred on the title's line.

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

Options

  • reveal?: boolean = false — A pointer behaviour: hidden at rest, shown under the pointer, the press or the keyboard's focus on the card.

Card: every option

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

Compose

  • A CardHeader's parts go straight in it: a CardMedia first when there is one, its CardTitle, a CardDescription and its action (a CardAction holding the theme's Button or IconButton). A whole tile as a button: Card asChild round the caller's button type="button", a CardText in it; never round a card whose rows hold controls of their own. The tray: a CardHeader (a CardMedia holding a 16 px icon, its CardTitle, a CardAction holding a quiet Button) then one CardSheet holding CardContent sections, each a CardText (CardTitle, CardDescription) and what follows it. The filled panel: a CardHeader (a CardMedia holding a 36 px avatar, its CardTitle, a CardDescription, a CardAction) then a CardContent whose children are its rows, each a label holding a CardText and the theme's Switch. The cover: a CardMedia holding the xl solid Avatar — to change the photo, that Avatar asChild on a button type="button" named for what it does, as a DropdownMenuTrigger's child, its menu's rows the photo's actions — then a CardHeader holding a CardTitle (the name) and a CardDescription (the email). Under it one CardSheet: a draft's Field orientation="inline" rows and a Textarea variant="bare", or CardContent sections (a CardTitle, CardDescriptions, your own lines).
  • CardHeaderButton: In a CardHeader's CardAction, as <CardHeaderButton onClick={send}>Send email</CardHeaderButton>, an hr, then <CardHeaderButton aria-label="Dismiss draft" onClick={dismiss}> holding one pack icon. The card removes nothing itself: on close, take the card away and move the focus to the next one.

Options

  • variant: default (default), outline, tray, filled, cover, promo
  • size: md (default), sm
  • asChild?: boolean = false — Draw the card on the caller's own element (the button or link a tile is), merging the card's props onto it.

Accessibility

  • The native element answers the keyboard.
  • hover, active, focus-visible: the browser's own (:hover, :active, :focus-visible): write nothing

Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:

StateDrawn by
disabledthe prop disabled

Motion

  • The part sets its own motion: add no transition or animation of your own.

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/meadow/components/card.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add @goop/meadow-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.