ConstControlled splitter position. Normalized value within [min, max].
If provided, the component uses this value instead of internal state.
Minimum allowed position. Defaults to 0.1.
Can also be a function that will be called with (containerWidth|containerHeight,splitterSize) as arguments
Maximum allowed position. Defaults to 0.9.
Can also be a function that will be called with (containerWidth|containerHeight,splitterSize) as arguments
The behavior on container resize. Its value can be proportional, fixFirst or fixSecond.
Default is proportional.
A split-pane container with a draggable splitter, supporting both horizontal and vertical layouts.
The pane can be either:
positionprop (number betweenminandmax), ordefaultPosition(used as the initial position).Layout behavior:
mode="horizontal": thepositioncontrols the width of the left pane.mode="vertical": thepositioncontrols the height of the top pane.Ref API:
ref.current:getMode()to get the current modesetMode(mode)to switch between"horizontal"and"vertical"getPosition()to get the current splitter positionsetPosition(position)to update the splitter positionEvents:
onSizeChange(position)whenever the pane size/position changes (e.g., via dragging).Rendering:
childreninto two separate containers (no portals).