Resizable

Accessible resizable panel groups and layouts with keyboard support.

Loading example…

About

The Resizable component is built on top of react-resizable-panels by bvaughn.

Installation

bunx --bun shadcn@latest add @sui/resizable

Install with the shadcn CLI or use the shared @workspace/ui package. Follow the installation guide to configure the registry, load styles, and choose import aliases.

Usage

import {
  ResizableHandle,
  ResizablePanel,
  ResizablePanelGroup,
} from "@workspace/ui/components/resizable"
<ResizablePanelGroup orientation="horizontal">
  <ResizablePanel>One</ResizablePanel>
  <ResizableHandle />
  <ResizablePanel>Two</ResizablePanel>
</ResizablePanelGroup>

Composition

Use the following composition to build a ResizablePanelGroup:

ResizablePanelGroup
├── ResizablePanel
├── ResizableHandle
└── ResizablePanel

Vertical

Use orientation="vertical" for vertical resizing.

Loading example…

Handle

Use the withHandle prop on ResizableHandle to show a visible handle.

Loading example…

RTL

To enable RTL support in shadcn/ui, see the RTL configuration guide.

Loading example…

API Reference

See the react-resizable-panels documentation.

Changelog

2025-02-02 react-resizable-panels v4

Updated to react-resizable-panels v4. See the v4.0.0 release notes for full details.

If you're using react-resizable-panels primitives directly, note the following changes:

v3v4
PanelGroupGroup
PanelResizeHandleSeparator
direction proporientation prop
defaultSize={50}defaultSize="50%"
onLayoutonLayoutChange
ImperativePanelHandlePanelImperativeHandle
ref prop on PanelpanelRef prop
data-panel-group-directionaria-orientation

The shadcn/ui wrapper components (ResizablePanelGroup, ResizablePanel, ResizableHandle) remain unchanged.