---
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 grid

A grid that sets several cards out in even columns that wrap with its width, for projects, files or features, for React and Tailwind CSS. Part of Goop Pro.

Pro. Its export: `CardGrid`.

## Try it

Add and take away cards (empty shows its empty state) and turn loading on to see its placeholders; narrow the window to see the columns change.

The folders are ours; nothing loads.

## When to use

- A grid that sets several cards out in even columns that wrap with its width, for projects, files or features.

## When not to use

- For one use Card.

## 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 grid on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

```sh
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-card-grid.json --yes
```

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

## Usage

```tsx
import { Card, CardDescription, CardText, CardTitle } from '@/components/ui/goop/card';
import { CardGrid, CardGridItem } from '@/components/ui/goop/card-grid';

const FOLDERS = [
  { title: 'Field notes', words: 'Notes from the last three site visits.' },
  { title: 'Interview guides', words: 'Eleven guides, two still in draft.' },
  { title: 'Consent forms', words: 'Signed and blank, by study.' },
];

function Folders({ loading }: { loading: boolean }) {
  return (
    <CardGrid aria-label="Folders" loading={loading} empty={{ title: 'No folders yet', description: 'Folders you make show up here.' }}>
      {FOLDERS.map((folder) => (
        <CardGridItem key={folder.title}>
          <Card>
            <CardText>
              <CardTitle>{folder.title}</CardTitle>
              <CardDescription>{folder.words}</CardDescription>
            </CardText>
          </Card>
        </CardGridItem>
      ))}
    </CardGrid>
  );
}
```

- Fits: list: collection (media: primary).
- height, width: add no class for these.

## API reference

### Options

- `loading?: boolean = false` — Show loading cards in place of the items, and mark the grid busy.
- `placeholders?: number = 3` — How many loading cards to show while `loading`.
- `empty?: CardGridEmpty` — The words shown, across the grid, when it holds no item and is not loading.

- Types: CardGridEmpty = { title: string; description?: string }

### Parts

- `CardGridItem` — One place in the grid

- Class recipes (cva): cardGridItemVariants
- data-slot values (to select a part by): card-grid, card-grid-empty, card-grid-item, card-grid-skeleton

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

- [Card](/themes/meadow/components/card): A framed surface that holds one piece of content, a list of rows or a section's words.
- [Item](/themes/meadow/components/item): One row of a list of records.
- [List group](/themes/meadow/components/list-group): A group of a list's rows under a header bar with its name and count that folds open and closed, such as to-dos by project.
- [Empty](/themes/meadow/components/empty): An empty state, what a view or a section shows when it holds nothing yet, with a line of help and an action to add the first item.
