---
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/"
---

# List page

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

Pro. Its export: `ListPage`.

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

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

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

## Usage

```tsx
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. `views` is a ToggleGroup of view pills (`fit`), `filters` a quiet Button opening a DropdownMenu or a SearchInput, `primaryAction` a CreateRow (`hideIcon`, the new-item field) or a Button, `collection` ListGroups of Item rows.
- height, width, padding, gap: add no class for these.

## API reference

### Options

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

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

- [Create row](/themes/meadow/components/create-row): A new item made in place in a list.
- [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.
- [Page header](/themes/meadow/components/page-header): The title block that opens a page, with its page-level actions.
