npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-card-grid.json --yesCard grid
ProA 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.
What an agent sees
- CardGridItemOne place in the grid
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>
);
}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.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-card-grid.json --yesAdd the Goop Card grid to this project. The install steps are at https://goop.so/docs/install.mdUsage
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
| Option | Type | What it does |
|---|---|---|
| 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 }
| Part | What it is |
|---|---|
| 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.