Resizable

Draggable split-pane panels for adjustable layouts. Supports horizontal and vertical split directions with an optional visible grip handle indicator.

  • Horizontal and vertical split directions
  • Optional grip handle indicator
  • Persists panel sizes
  • Built on react-resizable-panels
Panel A
Panel B

import { Resizable }from "@aetherstack/ui"

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

export function ResizableDemo() {
  return (
    <ResizablePanelGroup
      orientation="horizontal"
      className="min-h-[160px] rounded-lg border"
    >
      <ResizablePanel defaultSize={50}>
        <div className="flex h-full items-center justify-center p-4">Panel A</div>
      </ResizablePanel>
      <ResizableHandle withHandle />
      <ResizablePanel defaultSize={50}>
        <div className="flex h-full items-center justify-center p-4">Panel B</div>
      </ResizablePanel>
    </ResizablePanelGroup>
  )
}

Usage

Vertical split

Use orientation='vertical' to split panels top and bottom.

Top
Bottom

Three panels

Chain multiple panels with handles for a sidebar + content + detail layout.

Nav
Content
Detail

Props

PropTypeDefaultDescription

ResizablePanelGroup

PropTypeDefaultDescription
orientation"horizontal" | "vertical"The axis along which panels are split. Required.
classNamestringAdditional Tailwind classes on the group container.

ResizablePanel

PropTypeDefaultDescription
defaultSizenumberInitial panel size as a percentage of the group.
minSizenumberMinimum panel size as a percentage — prevents over-collapsing.
maxSizenumberMaximum panel size as a percentage.

ResizableHandle

PropTypeDefaultDescription
withHandlebooleanfalseRenders a visible grip icon in the center of the resize handle.
classNamestringAdditional Tailwind classes on the handle element.

* Required props

Accessibility

  • ResizableHandle renders with role='separator' and is keyboard operable — arrow keys resize adjacent panels.
  • Add aria-label to ResizablePanelGroup to describe the layout region to screen reader users.
  • Ensure minSize is set so panels never collapse to zero, which would hide content from all users.