On this page

Resizable panel

Keyboard, pointer, touch and assistive-technology behavior for resizable panes.

Separator semantics

The source component owns the focusable role="separator". Consumers provide a translated, contextual separatorLabel such as “Resize source and preview”. Do not put another focusable drag handle inside it or replace its name with a glyph. The source supplies unique SSR-safe pane IDs, aria-controls for the first pane, and percentage value/min/max attributes. aria-orientation describes the separator line: vertical for horizontal left/right panes, horizontal for vertical top/bottom panes.

Hidden-second and fixed-bound layouts have no visible/reachable separator. Hidden second content is display-hidden and inert but remains mounted. Real endpoint collapse requires min=0; collapsed content remains mounted and overflow-clipped, but is inert and omitted from the accessibility tree. Tab/Shift+Tab must skip its retained controls. Restoring the pane restores their ordinary native focusability, without replacing the controls or their local state.

Keyboard alternative to dragging

  • Left/Right move the separator in a horizontal left/right split.
  • Up/Down move it in a vertical top/bottom split.
  • Arrow moves are 1 percentage point; Shift+Arrow moves are 10.
  • Home and End select the current lower and upper bounds.
  • Enter resets the split to its initial ratio, constrained by the current bounds. Double-click offers the same reset for a pointer, without bubbling into a pane.
  • Key repeats form one resize lifecycle; releasing a supported key or leaving the separator ends it. Unrelated shortcuts are not consumed.

The reset point is captured when the component is created. Later model updates, container changes and responsive direction changes do not redefine it. A visible token-backed focus ring stays on the handle. Use the same layout in keyboard, pointer and touch modes; do not leave disabled controls accepting gestures.

Pointer and touch

A thin source-token divider is not the hit target. The target spans the cross axis, grows from resize.target to resize.touchTarget for coarse pointers, and uses touch-action: none only on the gesture surface. Pointer capture and a local shield above the panes avoid editor/iframe interception; gesture-scoped selection prevention avoids selecting pane content. Other controls and the document do not receive permanent cursor/selection overrides.

Pointer up, pointer cancel, lost capture, window blur, hidden/locked constraints and direction changes terminate the gesture. Cancellation retains the last valid ratio. Unmount removes capture, document/window listeners, observations and pending layout work. Each instance owns its own state.

Contrast, motion and reading preferences

The handle remains above independently clipped panes in both axes. The line is centered at 90% length by default, and the handle is at the midpoint, not at an edge that can disappear beneath a pane. Active/focus paint uses source resize roles and light/dark token values; forced-colors mode retains a system-color border/focus indicator. Reader rem scaling affects token-sized targets/handles. No resize transition animates under reduced motion (or during ordinary dragging). Locale changes update the consumer-provided label without reconstructing child editors, models or zoom state.