Skip to content
HomeCobalt

List and detail

Shows a list and the row chosen in it: the detail stands beside the list on a wide screen and replaces it on a phone, with a way back, and the arrow keys move the choice.

Examples

Filings to review: the chosen one opens beside the list, the arrows and j and k move through them, and below 640px it opens on its own with a way back.
In the app shellThe filings page of an app, its sidebar folded: the shell gives its whole main area to the list and the detail, each scrolling on its own. Expand shows the two side by side; in a narrower frame a filing opens in the list's place.

Filings

New filings from the funds you follow

Usage

Use it when

  • Triage and review: filings, alerts, tickets, applications, a moderation queue, where a person reads one, then the next.
  • A list whose rows are worth reading in full but not worth a page change each.

Use something else when

  • Rows a person compares across columns. Use DataTable instead.
  • Sections of settings. Use SettingsLayout instead.
  • A record a person opens once and stays on. Use Card instead, on the record's own page.

Rules

General

Content

Avoid

Limits

Install

npx shadcn@latest add https://kaanarici.com/r/cobalt/list-detail.json
import { ListDetail, ListDetailItem, ListDetailList, ListDetailPanel } from "@/components/cobalt/ui/list-detail"