Set collapsible to true on a panel to make it collapsible. Use collapsedSize to control its collapsed size. This can be useful for building sidebar layouts.
A
B
Vertical
Use the orientation prop to create a vertical splitter.
A
B
Multiple
Here is an example with multiple panels.
A
B
C
Store
Use the useSplitter hook to control the state of the splitter programmatically.
A
B
Props
Root
Prop
Default
Type
panels*
PanelData[]
The size constraints of the panels.
orientation
\horizontal\
'horizontal' | 'vertical'
The orientation of the splitter. Can be `horizontal` or `vertical`
asChild
boolean
Use the provided child element as the default rendered element, combining their props and behavior.
defaultSize
number[]
The initial size of the panels when rendered.
Use when you don't need to control the size of the panels.