The Resizable follows a strict pattern using reusable components (NResizablePanelGroup, NResizablePanel, NResizableHandle) listed in the Components section, similar to libraries like shadcn/ui. This atomic way is necessary due to complex nesting requirements of resizable layers.
Examples
Basic
| Prop | Default | Type | Description |
|---|---|---|---|
autoSaveId | null | string, null | Unique id used to auto-save group arrangement via localStorage. |
direction* | - | vertical, horizontal | The group orientation of resizable; required prop |
id | - | string, null | Group id; falls back to useId when not provided. |
keyboardResizeBy | 10 | number, null | Step size when arrow key was pressed. |
storage | defaultStorage | PanelGroupStorage | Custom storage API; defaults to localStorage |
You can use the autoSaveId prop to persist the layout data in localStorage. Try changing the layout and then refresh the page to see the layout persist.
Read more in Reka Splitter Root API.
Handle
| Prop | Default | Type | Description |
|---|---|---|---|
icon | i-lucide-grip-vertical | boolean, string | Add an icon to the resizable handle, falls back to i-lucide-grip-vertical when true. |
resizableHandle | solid-gray | {variant}-{color} | Custom handle color of resizable handle. Note that this does not apply to the icon. |
disabled | - | boolean | Disable drag handle |
id | - | string | Resize handle id (unique within group); falls back to useId when not provided. |
| Variant | Description |
|---|---|
solid | Uses border to create a solid handle. |
outline | Uses ring to create an outline handle. |
~ | The unstyle or base variant |
Read more in Reka Splitter Handle API.
Panel
| Prop | Default | Type | Description |
|---|---|---|---|
collapsedSize | - | number | The size of panel when it is collapsed. |
collapsible | - | boolean | Should panel collapse when resized beyond its minSize. When true, it will be collapsed to collapsedSize. |
id | - | string, null | Panel id (unique within group); falls back to useId when not provided. |
defaultSize | - | number | Initial size of panel (numeric value between 1-100) |
maxSize | - | number | The maximum allowable size of panel (numeric value between 1-100); defaults to 100 |
minSize | - | number | The minimum allowable size of panel (numeric value between 1-100); defaults to 10 |
order | - | number | The order of panel within group; required for groups with conditionally rendered panels |
Read more in Reka Splitter Panel API.
Presets
shortcuts/resizable.ts
Props
types/resizable.ts