Resizable
Accessible resizable panel groups and layouts with keyboard support.
Usage
<ui-resizable-panel-group direction="horizontal" class="min-h-[200px] max-w-md rounded-lg border">
<ui-resizable-panel defaultSize="50">
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold">Panel A</span>
</div>
</ui-resizable-panel>
<ui-resizable-handle withHandle></ui-resizable-handle>
<ui-resizable-panel defaultSize="50">
<div class="flex h-full items-center justify-center p-6">
<span class="font-semibold">Panel B</span>
</div>
</ui-resizable-panel>
</ui-resizable-panel-group>
Sub-components
<ui-resizable-panel-group> <ui-resizable-panel> <ui-resizable-handle>
Props
<ui-resizable-panel-group>
| Prop | Type | Default | Description |
|---|
direction | "horizontal" | "vertical" | "horizontal" | The direction of the panels. |
<ui-resizable-panel>
| Prop | Type | Default | Description |
|---|
defaultSize | number | — | Default size in percent. |
<ui-resizable-handle>
| Prop | Type | Default | Description |
|---|
withHandle | boolean | false | Show a visible handle grip. |
All components also accept standard HTML attributes (class, id, style, data-*, aria-*, etc.) which are passed through to the underlying element.