HextaUI

Resizable: Vertical

orientation="vertical" stacks panels. Groups nest, as in the demo above.

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

export function ResizableVertical() {
  return (
    <div className="h-72 w-full max-w-md overflow-hidden rounded-xl border">
      <ResizablePanelGroup orientation="vertical">
        <ResizablePanel defaultSize="30%" minSize="20%">
          <div className="flex h-full items-center justify-center text-sm font-medium">
            Header
          </div>
        </ResizablePanel>
        <ResizableHandle />
        <ResizablePanel minSize="30%">
          <div className="flex h-full items-center justify-center text-sm font-medium">
            Content
          </div>
        </ResizablePanel>
      </ResizablePanelGroup>
    </div>
  )
}

This adds the example as components/examples/resizable/vertical.tsx, together with the Resizable component and the HextaUI theme tokens it needs.

pnpm dlx shadcn@latest add https://hextaui.com/r/resizable-vertical.json

To add only the component, follow the Resizable installation.

Props in this example

The Resizable props this example sets, from the API reference.

PropTypeDefault
orientation
"horizontal" | "vertical""horizontal"
PropTypeDefault
defaultSize
number | string–
minSize
number | string–

Every prop is in the Resizable API reference.

See them all, with keyboard support and accessibility notes, on the Resizable page.