OGE logoOGE

Splitter

<oge-splitter> divides an area into resizable panes that come from projected <oge-splitter-pane> children, from a data-driven panes array, or both. Sizes are ratios, not percentages, so a configuration that does not add up to 100 is never an error — and a '240px' size pins a pane instead.

Layout is a single CSS grid in which the separators are real tracks, so panes mirror automatically in RTL and no pane needs an inline width.

APG window splitter signals CSS grid RTL touch

Resizable panes

Drag the separator, or Tab to it and use the arrow keys. sizes is a two-way model reporting the current ratios — the only state you need to keep.

[(sizes)] minSize ratios
Result list
Detail view

sizes → [35, 65]

Orientation

horizontal lays the panes out side by side, vertical stacks them. The keyboard follows the axis: Left/Right against a horizontal splitter, Up/Down against a vertical one.

orientation
Top / left
Bottom / right

Fixed and fluid panes

A '240px' size becomes a fixed grid track and leaves the share pool; dragging it moves real pixels. minSize and maxSize accept either unit, so a pixel floor on a ratio pane is fine.

size minSize maxSize px vs ratio
Fixed sidebar (240px)
Fluid content

Collapsible panes

A separator grows one grip per collapsible neighbour, so either side can be collapsed. Enter targets the pane before it (the APG primary pane) and Ctrl+Arrow reaches both. The pane returns at the size it left, and while collapsed it stays in the DOM as inert so aria-controls keeps pointing at a real element.

collapsible [(collapsed)] collapsedSize inert
Navigation
Editor

collapsed → false

Data-driven panes

Bind panes and render the bodies from one template. Declarative children and panes entries can be mixed — children come first, the same merge rule as the tabs and accordion families.

[panes] [ogeSplitterPaneTemplate]
0 — explorer
1 — editor
2 — inspector

Nested splitters

A splitter inside a pane just works — no second component and no wrapper. A data-driven pane nests by carrying its own panes, which defaults to the opposite axis.

nesting recursion
Sidebar
Editor
Terminal

Forms inside a pane

A pane is a plain block box and never a query container, so an <oge-form> inside one keeps resolving its @container queries against itself. Drag the separator: the column count follows the pane width while the window stays put.

@container oge-form
Preview

Keyboard & accessibility

Tab to a separator, then Arrow keys to move it by step, Home and End for the primary pane's smallest and largest size, and Enter to collapse or restore it. Ctrl+Arrow reaches either neighbour — the keyboard path to the second grip. Values are reported on one 0–100 scale via aria-valuenow.

role=separator aria-valuenow step Home/End/Enter
Primary
Secondary

Events

resizeStarted fires once, resized on every change and resizeEnded once the gesture settles — the same trio the references expose. paneCollapsing and paneExpanding are cancelable.

resizeStarted resized resizeEnded paneCollapsing
A — try Enter on the separator
B

Persisting sizes

sizes is the whole persistable state — a plain array of numbers and '<n>px' strings. There is no stateKey to learn and no storage token to provide: save it to localStorage, an API or a route param in a few lines.

[(sizes)] persistence
Left
Right

persist this → [30, 70]

Configuration

provideOgeSplitterConfig() sets application-wide defaults and every user-facing string, including the separators' accessible names. A per-instance [messages] input overrides it.