# Resizable panels

Two panels with a handle between them that you drag or move with the arrow keys. PlankUI component for React 19 and Tailwind CSS v4. Category: Display.

## Install

```bash
npx plankui@latest add resizable
```

## Usage

```tsx
import { Resizable } from "@/components/ui/resizable";

<Resizable label="sidebar" defaultSize={30}>{[<Sidebar />, <Main />]}</Resizable>
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| children | `[ReactNode, ReactNode]` | `required` | The two panels; the first one resizes. |
| direction | `"horizontal" \| "vertical"` | `"horizontal"` | Side by side, or stacked. |
| defaultSize | `number` | `50` | First panel's size in percent. |
| min / max | `number` | `15 / 85` | Limits in percent. |
| onResize | `(size: number) => void` |  | Called with the new size. |
| label | `string` | `"panel"` | Name of the first panel, for the handle's label. |

Source: https://github.com/VectorLabsHQ/plankui/blob/main/components/ui/resizable.tsx
