Application

Master–detail

A list beside its detail. Under 48rem only one shows, chosen with data-view.

Examples

Master–detail

Detail pane.

Anatomy

.master-detailFull-height grid (at least 100dvh): a φ⁶ ≈ 18rem list column and the detail. One column under 48rem.
> :first-childThe master, usually a .list. Scrolls on its own, with a hairline on its end edge.
> :last-childThe detail of the selected item.

API

AttributeValuesDescription
data-viewlistdetailUnder 48rem, which side shows; the other is hidden. Default list. Switching it is up to you.

Accessibility

  • Under 48rem the hidden side is display: none, gone for screen readers too. When you switch to detail, move focus to its heading and offer a way back that sets data-view="list".
  • Mark the selected row with aria-current="page" (or "true") so the list says which item the detail belongs to. The .list tints it and draws the accent edge.
Jump to
ProportionFoundations
MaterialFoundations
PresetsFoundations
ShellLayouts · Application
Container and stacksLayouts · Pages
SplitLayouts · Pages
Grid, bento, masonryLayouts · Pages
Switcher and rowLayouts · Pages
↑↓Move↵OpenescClose