npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-list-page.json --yesList page
ProA page that is a list of records, such as a to-do list or a feed, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
import { type ReactNode, useState } from 'react';
import { CreateRow, useCreateRow } from '@/components/ui/goop/create-row';
import { Item, ItemContent } from '@/components/ui/goop/item';
import { ListGroup, ListGroupContent } from '@/components/ui/goop/list-group';
import { PageHeader, PageHeaderTitle } from '@/components/ui/goop/page-header';
import { ToggleGroup, ToggleGroupItem } from '@/components/ui/goop/toggle-group';
import { ListPage } from '@/components/goop/patterns/list-page';
function Todos({ topBar }: { topBar: ReactNode }) {
const [todos, setTodos] = useState(['Renew the seed order']);
const create = useCreateRow({ onCreate: ({ title }) => void setTodos((all) => [title, ...all]) });
return (
<ListPage
header={topBar}
views={
<ToggleGroup fit aria-label="Views" defaultValue="all">
<ToggleGroupItem value="all" count={todos.length}>All</ToggleGroupItem>
<ToggleGroupItem value="inbox">Inbox</ToggleGroupItem>
</ToggleGroup>
}
heading={<PageHeader><PageHeaderTitle>All</PageHeaderTitle></PageHeader>}
primaryAction={<CreateRow {...create.row} open label="New to-do" placeholder="New to-do" hideIcon />}
collection={
<ListGroup>
<ListGroupContent>
{todos.map((todo) => (
<Item key={todo} variant="line"><ItemContent>{todo}</ItemContent></Item>
))}
</ListGroupContent>
</ListGroup>
}
/>
);
}When to use
- A page that is a list of records, such as a to-do list or a feed.
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 List page 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-list-page.json --yesAdd the Goop List page to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { type ReactNode, useState } from 'react';
import { CreateRow, useCreateRow } from '@/components/ui/goop/create-row';
import { Item, ItemContent } from '@/components/ui/goop/item';
import { ListGroup, ListGroupContent } from '@/components/ui/goop/list-group';
import { PageHeader, PageHeaderTitle } from '@/components/ui/goop/page-header';
import { ToggleGroup, ToggleGroupItem } from '@/components/ui/goop/toggle-group';
import { ListPage } from '@/components/goop/patterns/list-page';
function Todos({ topBar }: { topBar: ReactNode }) {
const [todos, setTodos] = useState(['Renew the seed order']);
const create = useCreateRow({ onCreate: ({ title }) => void setTodos((all) => [title, ...all]) });
return (
<ListPage
header={topBar}
views={
<ToggleGroup fit aria-label="Views" defaultValue="all">
<ToggleGroupItem value="all" count={todos.length}>All</ToggleGroupItem>
<ToggleGroupItem value="inbox">Inbox</ToggleGroupItem>
</ToggleGroup>
}
heading={<PageHeader><PageHeaderTitle>All</PageHeaderTitle></PageHeader>}
primaryAction={<CreateRow {...create.row} open label="New to-do" placeholder="New to-do" hideIcon />}
collection={
<ListGroup>
<ListGroupContent>
{todos.map((todo) => (
<Item key={todo} variant="line"><ItemContent>{todo}</ItemContent></Item>
))}
</ListGroupContent>
</ListGroup>
}
/>
);
}- Fits: board, list (their recipes).
- It draws its own AppFramePanel: put it straight in AppFrame beside AppFrameRail, with no AppFramePanel of yours round it or inside its slots.
viewsis a ToggleGroup of view pills (fit),filtersa quiet Button opening a DropdownMenu or a SearchInput,primaryActiona CreateRow (hideIcon, the new-item field) or a Button,collectionListGroups of Item rows. - height, width, padding, gap: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| arrangement? | ListPageArrangement | The contract's arrangement (the catalogue's ids): Meadow draws plain alone, every other id as it. |
| size? | 'fill' | 'tasks' = 'fill' | Where the page stands: fill (the default), the page, taking the row; tasks, the to-do column beside an AppFrameSecondPanel (a week), at the frame's tasks width, its lines 32 px in and its views line its top line. |
| header | ReactNode | The page's top bar, the theme's TopBar (pass it role="banner"), held over the page in the frame panel's header. |
| heading? | ReactNode | The page's heading at the start of the heading line: the theme's PageHeader. |
| views? | ReactNode | The views at the start of the views line, the page's first: the theme's ToggleGroup of view pills (fit). |
| filters? | ReactNode | The filters at the end of the heading line: a quiet Button opening a DropdownMenu, or a SearchInput. |
| primaryAction? | ReactNode | The page's way to add, on its own line under the heading: the theme's CreateRow (it fills the line) or a Button. |
| secondaryActions? | ReactNode | The page's other actions, at the end of the views line: the theme's IconButtons or Buttons. |
| collection | ReactNode | What the page lists, under the header at the page's width: the theme's ListGroups of Item rows, a list of Items, an Empty. |
| record? | ReactNode | The open record's card: the theme's RecordPeekPanel, a RecordPeekHeader and a RecordPeekBody in it. |
| peek? | Omit<RecordPeekProps, 'children'> | The RecordPeek's own props: open / onOpenChange, records, value / onValueChange, onPrevious / onNext, the full page (href or onExpand), container. |
- data-slot values (to select a part by): list-page, list-page-actions, list-page-content, list-page-create, list-page-filters, list-page-header, list-page-title, list-page-title-row, list-page-views, list-page-views-row
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.