Resizable
Accessible resizable panel groups and layouts.
Resizable — panels côte à côte avec une poignée pour ajuster leur taille (VS Code style). Group horizontal ou vertical. Chaque Panel a un defaultSize (%) et éventuellement min/maxSize.
Installation
$ bext ui add resizable
Copy and paste the following into src/components/ui/resizable.tsx.
This component is interactive — make sure the shared island is loaded (see Islands). It reacts to data-ui="resizable" hooks.
Usage
Anatomy
<ResizablePanelGroup direction="horizontal">
├── <ResizablePanel defaultSize={50} minSize={20}>left</ResizablePanel>
├── <ResizableHandle />
└── <ResizablePanel defaultSize={50}>right</ResizablePanel>
</ResizablePanelGroup>API Reference
ResizablePanelGroup
| Prop | Type | Default | Description |
|---|---|---|---|
| direction | "horizontal" | "vertical" | — | Sens du split. |
| children | ReactNode | — | undefined |
ResizablePanel
| Prop | Type | Default | Description |
|---|---|---|---|
| defaultSize | number | — | % de la taille initiale (0-100). |
| minSize | number | — | % minimum. Sinon 0. |
| maxSize | number | — | % maximum. Sinon 100. |
| children | ReactNode | — | undefined |
ResizableHandle
| Prop | Type | Default | Description |
|---|---|---|---|
| withHandle | boolean | — | Affiche un petit grip visuel au centre de la poignée. |
Data Attributes
Attributs qu'on peut cibler en CSS custom pour override le style par état.
| Attribute | On | Values | Description |
|---|---|---|---|
| data-ui="resizable" | PanelGroup root | undefined | undefined |
| data-panel-group-direction | PanelGroup root | "horizontal" | "vertical" | undefined |
Keyboard
| Key | Action |
|---|---|
| Arrow keys | Ajuster la taille par pas de 10px. |
| Home / End | Aller au min / max. |
Accessibility
Handle porte role="separator" aria-orientation aria-valuenow aria-valuemin aria-valuemax et est focusable au clavier.
Edit this component live in the bext playground. The PRISM + signals version is the bext-native idiom — fine-grained reactivity, no virtual DOM.
On This Page