---
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 in a pane beside it, 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 in a pane beside it.
- Also called: master-detail view or split view.

## When not to use

- For a quick look use RecordPeek.

## 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>/trail-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 { ListDetail, ListDetailList, ListDetailItem, ListDetailTrigger, ListDetailPanel } from '@/components/goop/patterns/list-detail';
import { Table, TableBody, TableRow } from '@/components/ui/goop/table';
import { TableCell, TableCellLabel } from '@/components/ui/goop/table-cell';
import { Prose } from '@/components/ui/goop/prose';

<ListDetail defaultValue="inv-2026-0148">
  <ListDetailList>
    <Table columns="minmax(96px, 1fr) auto">
      <TableBody>
        <ListDetailItem value="inv-2026-0148" asChild>
          <TableRow>
            <TableCell>
              <ListDetailTrigger>
                <TableCellLabel>2026-0148</TableCellLabel>
              </ListDetailTrigger>
            </TableCell>
            <TableCell>
              <TableCellLabel>Diallo Dental</TableCellLabel>
            </TableCell>
          </TableRow>
        </ListDetailItem>
      </TableBody>
    </Table>
  </ListDetailList>
  <ListDetailPanel title="2026-0148">
    <Prose>Diallo Dental, due 14 December.</Prose>
  </ListDetailPanel>
</ListDetail>
```

- Fits: inbox (its recipe).
- The list clips sideways: a grid wider than what the pane leaves (a week of days) scrolls in its own `div` with `className="overflow-x-auto"`.
- More on where it goes: list-detail--options.md
- height, width, padding, corner, border, background, text, motion: add no class for these.

## API reference

### Options

- `arrangement?: ListDetailArrangement` — The contract's arrangement (the catalogue's ids): Trail draws `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.
- `onValueChange?: (value: string | null) => void` — Hears every open and close with the record's id, or `null`.
- `container?: HTMLElement | null` — Where the folded pane's sheet is drawn; the end of `<body>` when left out.
- `side?: 'start' | 'end'` — Where the pane sits beside the list: this theme's `end` (the default) or `start`.
- `idle?: 'list' | 'hint'` — While nothing is open: `list` (the default) the list at full width, or `hint` the pane holding its `placeholder`.
- `fold?: 'sheet' | 'replace'` — In a root under 896 px: `sheet` (the default) the pane as a Sheet, or `replace` the pane in the list's place.
- `opens?: 'pane' | 'panel' | 'page' | 'peek'`

- State: value (value / defaultValue / onValueChange); drawn by 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; its props: list-detail--trigger.md
- `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: a SearchInput, a Select, the FilterChips in force.
- filtersEdge?: 'page' | 'item' = 'page'
- unreadRows?: boolean = false — The rows can be `unread` (an inbox): every row keeps the unread dot's room, read or not, and with `filtersEdge="item"` the filters start on that edge, so nothing moves as rows hide, show or are read.

### ListDetail: every option

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

### Compose

- ListDetailPanel: Put the record straight in, with no padding of your own: the panel pads it once, in every form.

### Options

- arrangement?: ListDetailArrangement — The contract's arrangement (the catalogue's ids): Trail draws `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.
- onValueChange?: (value: string | null) => void — Hears every open and close with the record's id, or `null`.
- container?: HTMLElement | null — Where the folded pane's sheet is drawn; the end of `<body>` when left out.
- side?: 'start' | 'end' — Where the pane sits beside the list: this theme's `end` (the default) or `start`.
- idle?: 'list' | 'hint' — While nothing is open: `list` (the default) the list at full width, or `hint` the pane holding its `placeholder`.
- fold?: 'sheet' | 'replace' — In a root under 896 px: `sheet` (the default) the pane as a Sheet, or `replace` the pane in the list's place.
- opens?: 'pane' | 'panel' | 'page' | 'peek' — Where a record opens: `pane` (the default) beside the list, `panel` in the frame's second container, `page` in the list's place, or `peek` in the theme's RecordPeek panel (give the root `href` or `onExpand`).
- State: value (value / defaultValue / onValueChange); drawn by data-state=open

### ListDetailPanel

The open record.

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

### Options

- title: ReactNode — The record's name: the pane's heading, and its region's name.
- description?: ReactNode — A line under the title in the folded pane's sheet.
- actions?: ReactNode — The record's own TopBarActions in the pane's header.
- placeholder?: ReactNode — What the pane holds while nothing is open, with `idle="hint"` (an Empty).
- closeLabel?: string = 'Close' — The close button's spoken name.
- aside?: ReactNode — The record's side panel: who it is from and its properties.
- asideLabel?: string = 'Details' — The side panel's spoken name.

### ListDetailTrigger

The control that opens its row's record.

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

### Options

- media?: ReactNode — What leads the record's words: a person's Avatar (`variant="solid"`, `aria-hidden`).
- Also takes: asChild?: boolean; type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean

## Accessibility

- The native element answers the keyboard.
- expanded: the attribute data-state=open
- open: the attribute data-state=open

## Motion

- The part sets its own motion: add no transition or animation of your own.

## Responsive behaviour

- ListDetailList: A search or filters over a list pane go in `filters`, never in a box of the caller's own above the region: the slot gives them the rows' edge, the gap under the header and their widths. Give them no width or margin: a search beside a Select takes the room the Select leaves, the Select fits its words, FilterChips take a line of their own, and on a phone each takes the row's width. Rows of the theme's Item (`variant="ghost"`, `"line"`) start their words 16 px in: give the list `filtersEdge="item"`, so the search starts there too. Rows that can be `unread`: give the list `unreadRows` too.

## 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, the prop sentences over 160 characters.

## Related

- [Record peek](/themes/trail/components/record-peek): A list whose open record shows in a panel over its end, for a quick look without leaving the list.
- [Table](/themes/trail/components/table): A data table of records compared across columns, with a header row whose columns can sort.
- [Table cell](/themes/trail/components/table-cell): One cell of a data table: a value, optionally with an icon or a picture before it, inside a row.
- [Prose](/themes/trail/components/prose): A block of running text set for reading, one paragraph or several, for a description, an article or a help page.
