Resizable

Accessible resizable panel groups and layouts with keyboard support.

Left
Right

About

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

Installation

pnpm add @ag/ui

Usage

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

Composition

Use the following composition to build a ResizablePanelGroup:

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

Examples

Vertical

Use orientation="vertical" for vertical resizing.

Handle

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

RTL

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

API Reference

See the react-resizable-panels documentation.