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

A list with the open record beside it, the list in a narrow column and the record in a centred reading column, for React and Tailwind CSS. Part of Goop Pro.

Pro. Its export: `ListDetail`.

## Try it

Choose what stands over the rows — nothing, a search, or the search with the filters in force — and see it take the rows’ own edge under the header; type to narrow the recordings, take the chip off or Clear all, open a recording beside the list (where the box is narrow, a sheet or the list’s place) and close it with Escape, the focus back on its row.

The recordings and the search are the example’s own, filtered in the page; a real app narrows its rows on its server and keeps the open recording in the URL.

## When to use

- A list with the open record beside it, the list in a narrow column and the record in a centred reading column.
- Also called: master-detail view or split view.

## 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 detail 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-detail.json --yes
```

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

## Usage

```tsx
import { useState } from 'react';
import { AppFrame, AppFramePanel, AppFrameRail } from '@/components/goop/patterns/app-frame';
import {
  ListDetail,
  ListDetailItem,
  ListDetailList,
  ListDetailPanel,
  ListDetailTrigger,
} from '@/components/goop/patterns/list-detail';

const NOTES = [
  { id: 'survey', name: 'Survey', line: 'The lower field, Saturday.' },
  { id: 'permit', name: 'Drainage permit', line: 'Forms due Friday.' },
];

function NotesPage() {
  const [open, setOpen] = useState<string | null>('survey');
  const note = NOTES.find((one) => one.id === open) ?? NOTES[0];
  return (
    <AppFrame>
      <AppFrameRail aria-label="Main" />
      <ListDetail value={open} onValueChange={setOpen}>
        <AppFramePanel size="list" aria-label="Notes">
          <ListDetailList>
            {NOTES.map((one) => (
              <ListDetailItem key={one.id} value={one.id}>
                <ListDetailTrigger>{one.name}</ListDetailTrigger>
              </ListDetailItem>
            ))}
          </ListDetailList>
        </AppFramePanel>
        <ListDetailPanel title={note.name} description={note.line} placeholder={<p>Choose a note.</p>}>
          <p>Bring boots.</p>
        </ListDetailPanel>
      </ListDetail>
    </AppFrame>
  );
}
```

- Fits: inbox (its recipe).
- ListDetailList: In the frame it goes in the `AppFramePanel size="list"`, whose body scrolls it; a heading over a group of rows is the theme's `SidebarGroupLabel` in a `SidebarGroup`, the rows in a list under it.
- ListDetailPanel: Put the record straight in with no padding of your own: the panel holds it to the reading column on the page's gutter.
- More on where it goes: list-detail--options.md
- height, width, padding, gap, corner, border, background, text: add no class for these.

## API reference

### Options

- `arrangement?: ListDetailArrangement` — The contract's arrangement (the catalogue's ids): Meadow draws `reading-pane` alone, every other id as it.
- `value?: string | null` — The open record's id, when the caller holds it (with `onValueChange`); `null`: none open.
- `defaultValue?: string | null = null` — The record open at first when the caller does not hold it; none by default.
- `onValueChange?: (value: string | null) => void` — Hears every open and close with the record's id, or `null` when the record closes.
- `side?: 'start' | 'end'` — Where the record sits beside the list: this theme's `end` (the default) or `start`, before it.

- State: value (value / defaultValue / onValueChange); drawn by data-focus-visible, data-state=open

### Parts

- `ListDetailList` — The list's region; its props: list-detail--list.md
- `ListDetailItem` — One record's row; takes asChild; value: string — The record's id: what the root's `value` holds while it is open
- `ListDetailTrigger` — The control that opens its row's record; takes asChild; media?: ReactNode — What leads the record's words, inside the trigger, in a 28 px slot: the record's pack glyph (the theme's `Glyph`) or a person's Avatar, `aria-hidden` (the words name the row); also takes type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean
- `ListDetailPanel` — The open record; its props: list-detail--panel.md

### ListDetailList

The list's region.

```tsx
import { ListDetailList } from '@/components/goop/patterns/list-detail';
```

### Options

- filters?: ReactNode — What narrows the rows, over them on the rows' own edge, 8 px over the first: a SearchInput, given no width.
- filtersEdge?: 'page' | 'item' = 'page' — Where the filters start and end, by where the rows start their words: `page` (the default) or `item`, the names of the one component API.
- unreadRows?: boolean = false — The rows can be `unread` (an inbox), the one component API's name.

### ListDetail: every option

```tsx
import { ListDetail } from '@/components/goop/patterns/list-detail';
```

### Compose

- ListDetailPanel: Its blocks (a property band, tabs, the body) follow one another; the title and words are the panel's, so never repeat them in a PageHeader of your own.

### Options

- arrangement?: ListDetailArrangement — The contract's arrangement (the catalogue's ids): Meadow draws `reading-pane` alone, every other id as it.
- value?: string | null — The open record's id, when the caller holds it (with `onValueChange`); `null`: none open.
- defaultValue?: string | null = null — The record open at first when the caller does not hold it; none by default.
- onValueChange?: (value: string | null) => void — Hears every open and close with the record's id, or `null` when the record closes.
- side?: 'start' | 'end' — Where the record sits beside the list: this theme's `end` (the default) or `start`, before it.
- State: value (value / defaultValue / onValueChange); drawn by data-focus-visible, data-state=open

### ListDetailPanel

The open record.

```tsx
import { ListDetailPanel } from '@/components/goop/patterns/list-detail';
```

### Options

- title: ReactNode — The record's name: the bar's title and the page's heading, which names the record's region.
- description?: ReactNode — The record's one line of words, 2 px under its heading.
- actions?: ReactNode — The record's own controls at the bar's end: the theme's TopBarAction, a quiet line of words.
- placeholder?: ReactNode — What the record's place holds while nothing is open (an Empty: "Choose a note"); left out, it stays empty.
- closeLabel?: string = 'Back to the list' — The name of the control that goes back to the list where the record takes its place (default "Back to the list").

## Accessibility

- The native element answers the keyboard.
- hover, focus: the browser's own (:hover, :focus): write nothing
- focus-visible: the attribute data-focus-visible
- expanded: the attribute data-state=open
- open: the attribute data-state=open
- current: the attribute aria-current=true

## Responsive behaviour

- In the frame, put the root in `AppFrame` after the rail, round an `AppFramePanel size="list"` (its header row, the list's name) holding the `ListDetailList`, and the `ListDetailPanel`: the list is then the frame's list column, the record its page, and on a phone the frame shows one at a time. Anywhere else the root draws the two columns itself.

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

Shortened to fit: the data-slot values.

## Related

- [App frame](/themes/meadow/components/app-frame): The window every page of the app sits in, with the navigation at its side and the top bar over the page.
- [Record peek](/themes/meadow/components/record-peek): A list whose record opens in a card beside the item that opened it.
- [Record page](/themes/meadow/components/record-page): One record's whole page, its title, facts, content and activity in Meadow's reading column under the page's top bar.
- [Overview grid](/themes/meadow/components/overview-grid): An overview page's body, stacking a band of figures, a wide section and a pair of sections, each under its muted label.
