Splitter
Resizable split panels for creating adjustable multi-pane layouts.
When to Use
- To divide content into resizable sections (e.g., code editor + preview)
- For side-by-side comparisons with adjustable widths
- To create dashboard panels that users can resize
Import
Examples
Horizontal Splitter
Drag the divider to resize panels.
Vertical Splitter
Set layout="vertical" for top/bottom panels.
Three Panels
Multiple panels can be arranged together.
With Min/Max Constraints
Limit how far panels can be resized.
Collapsible
Panels can be collapsed to their minimum size.
API
SplitterProps
layout—"horizontal" | "vertical"— Split direction (default:"horizontal")lazy—boolean— Lazy render panels during resize (default:false)onResize—(sizes: number[]) => void— Callback during resizeonResizeStart—(sizes: number[]) => void— Callback when resize startsonResizeEnd—(sizes: number[]) => void— Callback when resize endsclassName—string— Custom CSS classstyle—CSSProperties— Inline styles
Splitter.Panel Props
defaultSize—number | string— Initial panel sizemin—number | string— Minimum panel sizemax—number | string— Maximum panel sizecollapsible—boolean— Whether panel can be collapsed (default:false)resizable—boolean— Whether panel can be resized (default:true)className—string— Custom CSS classstyle—CSSProperties— Inline styles