Skip to content

Splitter

Two panes, one handle: drag it, or focus it and use arrows. Home and End jump to the edges.

Example

Editor

Panels resize from 10 to 90 percent.

Preview

Drag the bar, or focus it and press arrows.

<Splitter>
  <div slot="first">Editor</div>
  <div slot="second">Preview</div>
</Splitter>

Props

PropTypeDefaultDescription
directionhorizontal | verticalhorizontalSplit axis.
initial / min / maxnumber50 / 10 / 90First-pane percent bounds.
labelstringResize panelsHandle accessible name.

Theming

:root {
  --ink-split-pos: 50%;
}

Accessibility