Open GitHub repository
ComponentsResizable

Resizable

Creates adjacent panels whose boundary can be dragged to redistribute available space.

Installation

bunx @swift-rust/ui add resizable

Usage

tsx
1import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable";
2 
3<ResizablePanelGroup defaultSize={class="text-amber-400">40}>
4 <ResizablePanel index={class="text-amber-400">0}>Sidebar</ResizablePanel>
5 <ResizableHandle />
6 <ResizablePanel index={class="text-amber-400">1}>Content</ResizablePanel>
7</ResizablePanelGroup>

Composition

Resizable is composed of these parts:

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