Components

Resizable

Panels the user can resize by dragging a handle.

Sidebar
Content

Installation

npx shadcn@latest add @blank/resizable

Usage

import {
  ResizableHandle,
  ResizablePanel,
  ResizablePanelGroup,
} from "@/components/ui/resizable"
<ResizablePanelGroup direction="horizontal">
  <ResizablePanel defaultSize="30%">Sidebar</ResizablePanel>
  <ResizableHandle withHandle />
  <ResizablePanel defaultSize="70%">Content</ResizablePanel>
</ResizablePanelGroup>

Sizes are strings with units. A bare number is pixels in react-resizable-panels v4, so write "30%", not 30.

The group sets its own height to 100% inline, so size the element around it, not the group.

Examples

Nested

Groups nest. A vertical group inside a horizontal panel gives an editor with a terminal under it.

Files
Editor
Terminal