Flutter docs
Default skin

Splitter

Divide a region into resizable panels.

When to use

Use Splitter when adjacent persistent regions need user-controlled relative space.

Examples

Basic

Initialize panel size, panel size limit.

Control mode

Control the size of the splitter. When one of the panels disables resizable, dragging will be disabled.

Vertical

Use vertical layout.

Collapsible

Set collapsible to enable collapse. Can through min to limit dragging to expand when collapsed.

Control collapsible icons

Set collapsible.showCollapsibleIcon to control the display mode of collapsible icons.

Multiple panels

Multiple panels.

Complex combination

Complex combination panel, quick folding, prohibited from changing size

Lazy

Lazy mode, dragging does not update the size immediately, but updates when released.

Customize

customize handle elements and style

Custom semantic dom styling

You can customize the semantic dom style of Splitter by passing objects/functions through classNames and styles.

Double-clicked reset

Double-click the dragger to reset the Splitter.Panel to its default size.

API

Splitter, Splitter.Panel, and their props are exported from @ceebee/ui/client.

Splitter

PropertyDescriptionTypeDefaultVersion
classNamesCustomize class for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, string> | (info: { props })=> Record<SemanticDOM, string>-6.0.0
collapsiblemotion to enable collapse animation, icon to customize collapse icons{ motion?: boolean; icon?: { start?: ReactNode; end?: ReactNode } }-6.4.0
collapsibleIconcustom collapsible icon{start?: ReactNode; end?: ReactNode}-6.0.0
destroyOnHiddenDestroy panel content when collapsed (size is 0). Applies to all panels, can be overridden per panelbooleanfalse6.4.0
draggerIconcustom dragger iconReactNode-6.0.0
layoutLayout directionhorizontal | verticalhorizontal-
lazyLazy modebooleanfalse5.23.0
onCollapseCallback when expanding or collapsing(collapsed: boolean[], sizes: number[]) => void-5.28.0
orientationOrientation directionhorizontal | verticalhorizontal—
stylesCustomize inline style for each semantic structure inside the component. Supports object or function.Record<SemanticDOM, CSSProperties> | (info: { props })=> Record<SemanticDOM, CSSProperties>-6.0.0
verticalOrientation. Simultaneously existing with orientation, orientation takes prioritybooleanfalse—
onDraggerDoubleClickCallback triggered when the dragger is double-clicked(index: number) => void-6.3.0
onResizePanel size change callback(sizes: number[]) => void--
onResizeEndDrag end callback(sizes: number[]) => void--
onResizeStartCallback before dragging starts(sizes: number[]) => void--

Panel

PropertyDescriptionTypeDefaultVersion
collapsibleQuick foldingboolean | { start?: boolean; end?: boolean; showCollapsibleIcon?: boolean | 'auto' }falseshowCollapsibleIcon: 5.27.0
defaultSizeInitial panel size support number for px or 'percent%' usagenumber | string--
destroyOnHiddenDestroy panel content when collapsed (size is 0). Overrides Splitter's destroyOnHiddenboolean-6.4.0
maxMaximum threshold support number for px or 'percent%' usagenumber | string--
minMinimum threshold support number for px or 'percent%' usagenumber | string--
resizableWhether to enable drag and dropbooleantrue-
sizeControlled panel size support number for px or 'percent%' usagenumber | string--