Skip to content

Split Props

Detailed reference for all configuration properties available on the Split component.

Core Configuration

PropTypeDefaultDescription
idstringGeneratedUnique identifier for this split instance.
mode'horizontal' | 'vertical''horizontal'The orientation of the layout.
initialSizesstring[][]Starting sizes for each pane (e.g. ['30%', '70%']).
minSizesnumber[][]Minimum allowed width/height for each pane (percentage).
maxSizesnumber[][]Maximum allowed width/height for each pane (percentage).
collapsedboolean[][]Initial visibility state for each pane.

UI & Styling

PropTypeDefaultDescription
lineBarboolean | boolean[]falseIf true, uses a simplified thin line style for the resize bar.
visibleboolean | boolean[]trueControls the visibility of the resize handlebars.
disableboolean | boolean[]falsePrevents user interaction with specific handlebars.
classNamestring''Extra CSS class for the split container.
styleCSSProperties{}Inline styles for the split container.
renderBarfunctionundefinedCustom renderer to replace the default handlebar UI.

Advanced Features

PropTypeDefaultDescription
pluginsSplitPlugin[][]Array of plugins to extend the component's functionality.
enablePersistencebooleanfalseEnable automatic auto-save/restore to localStorage.
fixClassbooleanfalseForce-apply a legacy CSS fix for specific deep-nesting bugs.

Event Callbacks

onDragging

Triggered continuously during a user resize operation.

ts
onDragging?: (prevSize: number, nextSize: number, paneIndex: number) => void;

onDragEnd

Triggered once the user releases the resize handlebar.

ts
onDragEnd?: (prevSize: number, nextSize: number, paneIndex: number) => void;

onLayoutChange

A generic catch-all callback for any layout state change (open/close/add/remove).

ts
onLayoutChange?: (
  index: number,
  paneId: string,
  status: PaneStatus,
  direction: Direction | null
) => void;

Styling with CSS Variables

Instead of passing props for colors, v6 relies on modern CSS variables which can be overridden in your global stylesheet:

css
:root {
  --split-primary-color: #9c27b0;
  --split-bg-color: #e0e0e0;
  --split-icon-color: #666;
  --split-focus-ring: #4285f4;
}

Released under the MIT License.