Skip to content
Theme

Split view

A main side and a detail panel next to each other, like a record page and its attributes. Each scrolls on its own. The panel is layout.panel wide, or resizable; in a narrow view it moves below.

Examples

A fixed panel at layout.panel

The record itself. Narrow the window and the panel moves below it.

Resizable: drag the line, or focus it and use the arrow keys

A list of records on this side, the chosen one beside it.

Props

SplitView

A main side and a detail panel next to each other, like a record page and its attributes. Each side scrolls on its own. The panel is layout.panel wide, or resizable with a window splitter; when the view is narrow it moves below the main side.

PropTypeDefaultDescription
childrenReactNode—The main side: a list, or a record's content.
panelReactNode—The detail beside it: a record's attributes, or the item chosen from the list.
panelLabelstring—Names the panel's complementary landmark and its resize handle.
placement?"end" | "start""end"Which edge the panel sits on; it mirrors in right-to-left text.
resizable?booleanfalseLet the reader drag, or move with the arrow keys, the line between the two.
minPanelSize?number240The narrowest the panel can be made, in CSS pixels.
maxPanelSize?number640The widest the panel can be made, in CSS pixels.

Keyboard

KeyDoes
ArrowLeft or ArrowRightMove the line between the two (mirrored in right-to-left text)
Shift + ArrowMoves it further
Home or EndMake the panel its narrowest or widest

Accessibility

  • The panel is a complementary landmark named by panelLabel. It scrolls on its own, so it takes focus, and the arrow keys then scroll it even when it holds only text.
  • The resize handle follows the WAI-ARIA window splitter pattern: a focusable separator that reports the panel's width and controls it. React Aria has no splitter, so this one is built to the pattern and tested in the browser.
  • The handle is wider than the line it draws, so it is easy to grab.

Browser support

The stacking follows the view's own width through a container query, not the window's.