Feature Library

Split panes and docking tab groups

0.05 CPU ms
A still of the Split panes and docking tab groups demo
Still
The live demo starts when it’s in view.Drag a divider or a tab · double-click a divider to collapse · Shift+F10 on a tab for every move · F6 between panes

The layout of every editor, from a JSON tree you can save and restore.

What it costs a frame

0.05 ms
GPU
not used
CPU, median
0.05 ms
CPU, 95th pct
0.13 ms
Draw calls
0
Weight
Light

Measured 7 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 156, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Measured with the demo driving itself on the editor layout: for two seconds of every three the Files divider is dragged back and forth with real pointer events (one measure of the tree and only the changed flex-grow writes per frame), then the Preview tab is docked into the editor group and split back out beside it, and the bottom panel collapses and expands. Nothing runs between steps: at rest the panes cost nothing. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
unknown GPU · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring toolnot timed0.050.13
apple · Apple A19 Proin a browser tab · 16 November 2026not timed0.020.10
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026not timed0.040.10

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
DOM and CSSPlain DOM and CSS: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages

What it’s for

  1. Code and text editors
  2. Design and creative tools
  3. Admin consoles with a sidebar and a detail panel
  4. Mail and chat: list, message, details
  5. Dashboards people arrange themselves
  6. Any page with a resizable sidebar

Pitfalls, in brief

  1. The host needs a size: the panes fill it (100% of its width and height).
  2. A tab’s content is made once, on first show, and then moved, never remade.
  3. Keep at least one flexible pane in every split.
  4. A fixed pane’s size is in CSS pixels and a share is a fraction: an app that saves a layout on a phone and restores it on a desktop gets the same sidebar width and proportionally wider content, which is usually right.
  5. Controlled use (controlled: true) shows nothing new until you call setLayout with the layout from onChange.
3 more in brief
  1. The tab strip scrolls sideways on touch, so a touch drag starts with a short hold (350 ms).
  2. Tab ids and node ids become parts of element ids: two instances on one page are kept apart by a per-instance prefix, but keep ids short and stable, because the saved JSON refers to them.
  3. Without the plain look (split-panes.css) the panes still work and stay accessible, in system colours; the base file has no colours of its own, so a look of yours has to give the divider, the drop indicator and the menu theirs.
8 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

Written for the library. Fully custom code.

WAI-ARIA Authoring Practices Guide (W3C): The window splitter pattern (role=separator with aria-valuenow, -min, -max and aria-controls; the arrows, Home, End, Enter to collapse and restore, F6 between panes), and the tabs pattern for each group (one Tab stop, the arrows, Home, End, Delete to close). Written here from scratch.

CSS Flexible Box Layout (W3C): How the room is shared within minimums and maximums: the freeze-and-share-again loop follows the spec’s resolution of flexible lengths.

split panesresizablesplitterdockingtab groupswindow splittertabslayout treejsoncollapsedrag and dropaccessibilitykeyboardtouchrtldomcssno dependencies

Near it in the frame