Resizable

A split view: panels with dividers to drag, like Mail's message list and preview.

@cupertinoui/resizableRegistry JSON

Installation

pnpm dlx shadcn@latest add @cupertinoui/resizable

The first install also adds the macOS theme. See Installation to set up the registry.

Usage

import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/resizable"

<ResizablePanelGroup orientation="horizontal">
  <ResizablePanel defaultSize="30%">…</ResizablePanel>
  <ResizableHandle />
  <ResizablePanel>…</ResizablePanel>
</ResizablePanelGroup>

API Reference

Every part forwards the props of the underlying element. The props below are the ones CupertinoUI adds or changes.

ResizableHandle

PropTypeDescription
withHandleboolean
Default: false
Shows a grip on the divider.
classNamestringExtra classes, merged with the component's own.

ResizablePanelGroup / ResizablePanel

PropTypeDescription
classNamestringExtra classes, merged with the component's own.