sigilUI

Resizable Panel

Resizable panel layouts with drag handles. Create split panes for editors, file browsers, and dashboards.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { ResizablePanelGroup, ResizablePanel, ResizableHandle } from "@sigil-ui/components";

Usage

<ResizablePanelGroup orientation="horizontal" className="min-h-[120px] border border-[var(--s-border)]">
  <ResizablePanel>Left</ResizablePanel>
  <ResizableHandle />
  <ResizablePanel>Right</ResizablePanel>
</ResizablePanelGroup>

Vertical split

<ResizablePanelGroup orientation="vertical" className="h-[400px]">
  <ResizablePanel defaultSize="60%">
    <div className="p-4">Editor</div>
  </ResizablePanel>
  <ResizableHandle />
  <ResizablePanel defaultSize="40%">
    <div className="p-4">Terminal</div>
  </ResizablePanel>
</ResizablePanelGroup>

Three-panel layout

<ResizablePanelGroup orientation="horizontal">
  <ResizablePanel defaultSize="20%" minSize="15%">Sidebar</ResizablePanel>
  <ResizableHandle />
  <ResizablePanel defaultSize="50%">Editor</ResizablePanel>
  <ResizableHandle />
  <ResizablePanel defaultSize="30%" minSize="20%">Preview</ResizablePanel>
</ResizablePanelGroup>

Token integration

CSS VariableUsed for
--s-borderHandle color
--s-border-interactiveHandle hover/active color
--s-surfacePanel background
--s-duration-fastHandle hover transition

Props

ResizablePanelGroup

PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"Split direction
classNamestring—Additional CSS classes
childrenReactNode—Panels and handles

ResizablePanel

PropTypeDefaultDescription
defaultSizenumber—Initial size as percentage
minSizenumber10Minimum size as percentage
maxSizenumber—Maximum size as percentage
classNamestring—Additional CSS classes
childrenReactNode—Panel content

Accessibility

  • Handle is focusable with role="separator" and aria-orientation
  • Arrow keys resize panels by 10% increments
  • aria-valuemin, aria-valuemax, aria-valuenow reflect panel size