Resizable

Accessible resizable panel groups and layouts with keyboard support.

Loading...

Installation

$npx shadcn@latest add @craftdotui/craftui-resizable

Anatomy

<ResizablePanelGroup orientation="horizontal">
  <ResizablePanel>One</ResizablePanel>
  <ResizableHandle withHandle />
  <ResizablePanel>Two</ResizablePanel>
</ResizablePanelGroup>
<Resizable.Root orientation="horizontal">
  <Resizable.Panel>One</Resizable.Panel>
  <Resizable.Handle withHandle />
  <Resizable.Panel>Two</Resizable.Panel>
</Resizable.Root>

Demo

Vertical

Use orientation="vertical" on <ResizablePanelGroup /> to stack panels vertically.

Loading...

With Handle

Pass withHandle to <ResizableHandle /> to render a visible drag grip indicator.

Loading...

Collapsible

Enable collapsible on <ResizablePanel /> and use usePanelRef() to imperatively collapse or expand panels.

Loading...

Props

ResizablePanelGroup

Prop
Type
Default

ResizablePanel

Prop
Type
Default

ResizableHandle

Prop
Type
Default