DocsDocs

Panes

Two panes side by side, such as a list and its detail.

BetaSince 1.0.0
On this page

Overview

A main pane and a supporting one.

Show code, SupportingPane.tsx

A list and its detail.

Show code, ListAndDetail.tsx

Variants

Side by side

The panes sit side by side once they are as wide as a medium, an expanded or a large window.

Medium

A main pane that reads well narrow, such as a list.

Expanded

Most panes. The default.

Large

A wide main pane, such as a table or a canvas.

Resizable

People can resize the supporting pane or the list by the gap between the panes, with its small grip, by pointer or with the arrow keys.

Show code, ResizableDetails.tsx

Anatomy

  1. Root

  2. List

  3. Divider

  4. Detail

Show code, PanesAnatomy.tsx

Behaviour

Scrolling

Each pane scrolls on its own where the panes have a height, as in a Scaffold whose body scrolls. Where the page scrolls, the panes scroll with it.

Adapting to width

The panes decide how they sit from their own width alone.

  • A supporting pane becomes a side sheet in a medium width and a bottom sheet in a compact one, which a button in the main pane opens. The sheet is on a Sheet's color, so a surface in the pane reads as the same panel.
  • In less room a list and its detail show one at a time, and a back button named after the list, here Team inbox, returns to it.
Show code, SupportingByWidth.tsx
Show code, ListDetailByWidth.tsx

Rules

Whatever the room, people can reach both panes.

Use it when

  • A main pane with a supporting one, such as a document and its details
  • A list beside the chosen item's detail, such as messages
DoA button that opens the details where there is no room.
Show code, DetailsButton.tsx
Don’tNo button: in less room, the details can’t be reached.
Show code, NoWayToDetails.tsx

Between two surfaces

A resizable gap goes between two surfaces, one in each pane.

  • Beside content that floats on the page, such as a list beside bare text, its grip hangs in empty space with nothing to say what it resizes.
  • So leave it out where the panes have no surfaces.

The application's navigation goes in the Scaffold, not in a supporting pane.

  • The next level shows in the detail rather than in panes inside a pane.

Accessibility

KeyAction
Esc in the supporting sheetCloses it, and focus returns to where it was.
←, → on the dividerMoves the divider a little; further with Shift.
Page Up, Page Down on the dividerMoves the divider further.
Home, End on the dividerMoves the resized pane to its smallest or largest width.
Enter on the back buttonReturns from the detail to the list, and focus to its current row.