# Resizable > Panels the user can resize by dragging a handle or with the keyboard. Source: https://shellui.dev/docs/v0.4/components/layout/resizable The resizable panel group is **new in v0.4.0**. `ResizablePanelGroup` lays out `ResizablePanel`s in a row or a column, and a `ResizableHandle` between two panels resizes them. Drag a handle, or focus it with Tab and use the arrow keys, Home and End. The browser moves the panels while you drag and reports the new sizes to .NET once at the end, so dragging stays smooth on Blazor Server. ## Installation ```bash shellui add resizable ``` This installs `ResizablePanelGroup`, `ResizablePanel`, `ResizableHandle` and `shellui-js`, which handles the dragging. > **Replaces the old Resizable** > > Before 0.4.0, `Resizable` was a flex container that didn't resize. The NuGet package still has it, deprecated; `shellui add resizable` now installs the panel group instead. ## Usage ### Basic Give the group a height (here from its parent). Sizes are percentages of the group: a panel with `DefaultSize` keeps it, and panels without one share the rest. `OnLayout` reports every panel's size after a drag or key press. ```razor
Sidebar
Content

Layout: @string.Join(" / ", layout.Select(s => $"{s:0}%"))

@code { private IReadOnlyList layout = new[] { 30d, 70d }; } ``` ### Nested and vertical `Direction="vertical"` stacks the panels. Put a group inside a panel to split it again. `MinSize` and `MaxSize` limit a panel, and `WithHandle` shows a grip on the handle. ```razor
Files
Editor
Terminal
Inspector
``` ## Keyboard | Key | Action | |-----|--------| | Arrow keys | Move the focused handle by `KeyboardStep` percent (left/right in a row, up/down in a column) | | Home | Shrink the panel before the handle as far as the two panels' `MinSize` and `MaxSize` allow | | End | Grow it as far as those limits allow | ## API Reference ### ResizablePanelGroup | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `Direction` | `string` | `"horizontal"` | `horizontal` for a row, `vertical` for a column | | `KeyboardStep` | `double` | `10` | Percent a focused handle moves per arrow key press | | `OnLayout` | `EventCallback` | — | Raised after a drag or key press with every panel's size, in percent | | `ChildContent` | `RenderFragment?` | `null` | Panels and handles, alternating | | `Class` | `string?` | `null` | Additional CSS classes | The group's `Layout` property returns the current sizes. ### ResizablePanel | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `DefaultSize` | `double?` | `null` | Starting size in percent; panels without one share what's left | | `MinSize` | `double` | `0` | Smallest size in percent | | `MaxSize` | `double` | `100` | Largest size in percent | | `ChildContent` | `RenderFragment?` | `null` | The panel's content | | `Class` | `string?` | `null` | Additional CSS classes | ### ResizableHandle | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `WithHandle` | `bool` | `false` | Shows a grip on the handle | | `Disabled` | `bool` | `false` | Stops the handle resizing and takes it out of the Tab order | | `Class` | `string?` | `null` | Additional CSS classes | ## Accessibility - Each handle has `role="separator"`, its orientation, and `aria-valuenow` with the size of the panel before it - Handles are in the Tab order (unless `Disabled`) and show a focus ring - Resizing needs an interactive render mode and `shellui.js`, which `shellui add resizable` installs and the NuGet package loads by itself