structyl

Resizable

stable

Resizable panel groups with draggable handles.

Basic usage

A
B

Examples

Three-panel layout

A sidebar, main content, and detail panel with draggable handles.

Sidebar
Main
Detail

Dashboard panels

Resizable panels support horizontal and vertical groups with keyboard handles.

Navigation
Main panel

Features

  • Pointer + keyboard handles.
  • Horizontal or vertical.

Installation

bash
pnpm dlx structyl add resizable

API Reference

Resizable.Group

A set of resizable panels.

PropTypeDefault
direction'horizontal' | 'vertical'

Resize axis.

'horizontal'
onLayout(sizes: number[]) => void

Called when sizes change.

Resizable.Panel

A single panel.

PropTypeDefault
idstring

Unique panel id.

defaultSizenumber

Initial size (flex units).

minSizenumber

Minimum size.

Resizable.Handle

The drag handle between panels.

PropTypeDefault
between[string, string]

IDs of the panels on each side.

withHandleboolean

Render a visible grip.

Resizable | structyl