Loading...
Installation
Install the following dependencies:
Copy and paste the following code into your project.
Loading...
Update the import paths to match your project setup.
Composition
Resizable ├── ResizablePanel ├── ResizableResizeTrigger └── ResizablePanel
Examples
Collapsible
Loading...
Controlled
Loading...
Default
Loading...
Disabled
Loading...
Size Constraints
Loading...
Vertical
Loading...
With Handle
Loading...
API Reference
Resizable
| Prop | Type | Default | Description |
|---|---|---|---|
id | string | undefined | — | Unique identifier used to connect the component parts. |
orientation | "horizontal" | "vertical" | undefined | "horizontal" | Sets the component orientation and keyboard navigation axis. |
size | PanelSize[] | undefined | — | Configures size. |
defaultSize | PanelSize[] | undefined | — | Configures default size. |
onResize | ((details: ResizeDetails) => void) | undefined | — | Runs when resize changes. |
onResizeStart | (() => void) | undefined | — | Runs when resize start changes. |
onResizeEnd | ((details: ResizeEndDetails) => void) | undefined | — | Runs when resize end changes. |
ids | ElementIds | undefined | — | Overrides generated identifiers for individual parts. |
keyboardResizeBy | number | null | undefined | — | Configures keyboard resize by. |
nonce | string | undefined | — | Configures nonce. |
onCollapse | ((details: ExpandCollapseDetails) => void) | undefined | — | Runs when collapse changes. |
onExpand | ((details: ExpandCollapseDetails) => void) | undefined | — | Runs when expand changes. |
registry | SplitterRegistry | undefined | — | Configures registry. |
Context, Hooks, and Types
| Export | API |
|---|---|
useSplitter | Creates or accesses the component API. |
useSplitterContext | Returns the nearest component API. |
Angular
React
Solid
Svelte
Vue