---
agent:
  instructions: "Search goop.so for Goop's components, templates, design skill, docs, pricing and terms. Ask in keywords or a plain question, such as \"date picker props\" or \"is the design skill free\"; the answer is the matching page sections in Markdown, each with its address."
  endpoint: "https://goop.so/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Card list

A short list of rows inside an outline card, for what is recent, due or shared, for React and Tailwind CSS. Free, MIT.

Free. Its export: `CardList`.

## Try it

Open a folder (a press is counted), take the rows away to see the empty row and make the first folder from its action, or put a line of words above the rows; Tab walks the rows in order.

The folders are ours and nothing opens: a press is only counted.

## When to use

- A short list of rows inside an outline card, for what is recent, due or shared.

## When not to use

- For a long list use a page's list or a Table.

## 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 list on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing.

```sh
npx shadcn@4.23.1 add @goop/trail-card-list
```

```text
Add the Goop Card list to this project. The install steps are at https://goop.so/docs/install.md
```

## Usage

```tsx
import { CardList } from '@/components/ui/goop/card-list';
import { Card, CardHeader, CardTitle } from '@/components/ui/goop/card';
import { Item, ItemOverlay, ItemContent, ItemTitle, ItemDescription, ItemActions } from '@/components/ui/goop/item';

<Card variant="outline">
  <CardHeader>
    <CardTitle asChild>
      <h3>Due this week</h3>
    </CardTitle>
  </CardHeader>
  <CardList aria-label="Due this week" empty={{ title: 'Nothing due this week' }}>
    <Item asChild>
      <li>
        <ItemOverlay asChild>
          <a href="/visits/harbour" aria-label="Open Harbour visit" />
        </ItemOverlay>
        <ItemContent>
          <ItemTitle>Harbour visit</ItemTitle>
          <ItemDescription>Notes due Thursday</ItemDescription>
        </ItemContent>
        <ItemActions>3 notes</ItemActions>
      </li>
    </Item>
  </CardList>
</Card>
```

- Fits: overview, record (their recipes).
- Put it straight in a `Card variant="outline"`, after its CardHeader (and a CardContent, when the card has words of its own), never in a CardContent or a padded `div`: it takes the card's inset by itself. Each row is an `Item asChild` round an `li`, its ItemContent (ItemTitle, ItemDescription) and its ItemActions; a whole row as a link, an `ItemOverlay asChild` round the caller's `a`. Give it an `aria-label` (the card's title) and its `empty` words. A settings card's rows are Fields, not Items: no CardList there. Over about eight rows it is a page's list, not a card's.
- width, corner, background, shadow: add no class for these.

## API reference

### Options

- `empty?: CardListEmpty` — The words shown in one row when the list holds no row.

- Types: CardListEmpty = { title: string; description?: string; action?: ReactNode }

## 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.

## Related

- [Table](/themes/trail/components/table): A data table of records compared across columns, with a header row whose columns can sort.
- [Card](/themes/trail/components/card): A framed surface that holds one piece of content or a list of settings rows.
- [Item](/themes/trail/components/item): One row of a list of records.
- [Citation](/themes/trail/components/citation): A source's small numbered chip inside an AI answer's words, right after the claim it backs.
