# Resizable

- **Section:** Components
- **URL:** https://refast.fastapicloud.dev/docs/components/resizable
- **Markdown:** https://refast.fastapicloud.dev/docs/components/resizable.md
- **Source:** https://github.com/idling-mind/refast-docs/blob/main/docs/pages/components/layout/resizable.py
- **Live examples:** the widgets on this page need a browser; open the URL above to try them.
- **Applies to:** refast 0.12.2

Split-pane layout built on Radix UI `ResizablePanelGroup`. Users can drag
the handle to resize panels at runtime.

```python
from refast.components import ResizablePanelGroup, ResizablePanel, ResizableHandle

ResizablePanelGroup(
    direction="horizontal",
    children=[
        ResizablePanel(default_size=30, min_size=15, children=[sidebar]),
        ResizableHandle(with_handle=True),
        ResizablePanel(default_size=70, children=[main_content]),
    ],
)
```

Panel A

Drag the handle

Panel B

to resize

## ResizablePanelGroup

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `direction` | `"horizontal" \| "vertical"` | `"horizontal"` | Split orientation |
| `children` | `list \| Component \| None` | `None` | Alternating panels and handles |
| `on_layout` | `Callback \| None` | `None` | Fired with new panel size array on resize |
| `id` | `str \| None` | `None` | Unique element ID |
| `class_name` | `str` | `""` | Extra Tailwind classes |

## ResizablePanel

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `default_size` | `float` | `50` | Initial size as % of group |
| `min_size` | `float \| None` | `None` | Minimum size % |
| `max_size` | `float \| None` | `None` | Maximum size % |
| `collapsible` | `bool` | `False` | Allow fully collapsing the panel |
| `collapsed_size` | `float \| None` | `None` | Size % when fully collapsed |
| `children` | `list \| Component \| None` | `None` | Panel content |

## ResizableHandle

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `with_handle` | `bool` | `False` | Show a visible grip icon on the handle |
| `id` | `str \| None` | `None` | Unique element ID |
| `class_name` | `str` | `""` | Extra Tailwind classes |

## Examples

```python
# Three-column layout
ResizablePanelGroup(
    direction="horizontal",
    class_name="min-h-screen",
    children=[
        ResizablePanel(default_size=20, min_size=10, children=[nav]),
        ResizableHandle(),
        ResizablePanel(default_size=60, children=[editor]),
        ResizableHandle(),
        ResizablePanel(default_size=20, min_size=10, children=[sidebar]),
    ],
)
```

---

Part of the Refast documentation: [all pages](https://refast.fastapicloud.dev/llms.txt), [everything on one page](https://refast.fastapicloud.dev/llms-full.txt), [search](https://refast.fastapicloud.dev/api/search?q=save_prop).
