useResizablePanel
Panel resizing composable for split layouts.
Import
typescript
const {
panelWidth,
isResizing,
startResize,
onResize,
stopResize,
} = useResizablePanel(options)Options
| Option | Type | Default | Description |
|---|---|---|---|
initialWidth | number | 300 | Initial panel width (px) |
minWidth | number | 200 | Minimum width |
maxWidth | number | 600 | Maximum width |
Return Values
| Property | Type | Description |
|---|---|---|
panelWidth | Ref<number> | Current panel width |
isResizing | Ref<boolean> | Whether resize is in progress |
Source
app/composables/useResizablePanel.ts