Resizable

Accessible resizable panel groups and layouts with keyboard support.

Spec · from metadata

When to use

  • •Split-pane layouts where users need to resize sections (e.g., editor + preview)
  • •Adjustable sidebar and main content layouts
  • •IDE-style interfaces with resizable panels

When not to use

  • •For fixed column layouts — use CSS Grid instead
  • •For collapsible sections — use Accordion or Collapsible instead
  • •For responsive layouts that only change at breakpoints — use responsive CSS instead

Anti-patterns

Avoid<ResizablePanelGroup><ResizablePanel>A</ResizablePanel><ResizablePanel>B</ResizablePanel></ResizablePanelGroup>
Prefer<ResizablePanelGroup orientation="horizontal"><ResizablePanel defaultSize="50%">A</ResizablePanel><ResizableHandle /><ResizablePanel defaultSize="50%">B</ResizablePanel></ResizablePanelGroup>

A ResizableHandle is required between panels for resize interaction

Avoid<ResizablePanel defaultSize={30}>...<ResizableHandle /><ResizablePanel defaultSize={70}>
Prefer<ResizablePanel defaultSize="30%">...<ResizableHandle /><ResizablePanel defaultSize="70%">

A bare number is pixels in react-resizable-panels v4, so these panels are 30px and 70px, not 30% and 70%

Accessibility

  • Required ARIAaria-orientation (set by react-resizable-panels on handle)
  • Screen readerHandles act as separators; screen readers announce orientation. Consider adding aria-label to panels for context.

Token bindings

TokenCategoryUsage
bg-bordercolorHandle track and grip icon container background
ring-ringcolorHandle focus ring color
Recent changes
  • fixed

    Resizable docs use the v4 API

    2026-11-05

Import

import {
  ResizablePanelGroup,
  ResizablePanel,
  ResizableHandle,
} from "@timelycare/helix-ui"

Structure

PartTailwind
PanelGroupflex bg-background border border-border rounded-lg
Panelflex-1 overflow-hidden
Handle (line)w-px bg-border (vertical) / h-px bg-border (horizontal)
Handle gripw-3 h-4 bg-border border border-border rounded-xs
Grip iconsize-2.5 text-foreground (GripVertical)

Orientation

orientation on the group, horizontal by default.

OrientationLayoutHandle
horizontalSide-by-side panelsVertical divider with grip
verticalStacked panelsHorizontal divider with grip

States

StateImplementation
DefaultHandle grip visible with bg-border
HoverCursor changes to col-resize or row-resize
DraggingActive resize, panels update width/height
Focusfocus-visible:ring-2 focus-visible:ring-ring on handle

Common Patterns

Two Panels Horizontal

<ResizablePanelGroup orientation="horizontal" className="rounded-lg border">
  <ResizablePanel defaultSize="50%">
    <div className="flex h-full items-center justify-center p-6">
      <span className="font-semibold">One</span>
    </div>
  </ResizablePanel>
  <ResizableHandle withHandle />
  <ResizablePanel defaultSize="50%">
    <div className="flex h-full items-center justify-center p-6">
      <span className="font-semibold">Two</span>
    </div>
  </ResizablePanel>
</ResizablePanelGroup>

Three Panels with Nesting

<ResizablePanelGroup orientation="horizontal" className="rounded-lg border">
  <ResizablePanel defaultSize="25%">
    <div className="flex h-full items-center justify-center p-6">
      <span className="font-semibold">Sidebar</span>
    </div>
  </ResizablePanel>
  <ResizableHandle withHandle />
  <ResizablePanel defaultSize="75%">
    <ResizablePanelGroup orientation="vertical">
      <ResizablePanel defaultSize="70%">
        <div className="flex h-full items-center justify-center p-6">
          <span className="font-semibold">Content</span>
        </div>
      </ResizablePanel>
      <ResizableHandle withHandle />
      <ResizablePanel defaultSize="30%">
        <div className="flex h-full items-center justify-center p-6">
          <span className="font-semibold">Footer</span>
        </div>
      </ResizablePanel>
    </ResizablePanelGroup>
  </ResizablePanel>
</ResizablePanelGroup>

Collapsible Sidebar

<ResizablePanelGroup orientation="horizontal" className="rounded-lg border">
  <ResizablePanel defaultSize="20%" minSize="15%" maxSize="30%" collapsible>
    <div className="p-4">Sidebar</div>
  </ResizablePanel>
  <ResizableHandle withHandle />
  <ResizablePanel defaultSize="80%">
    <div className="p-4">Main Content</div>
  </ResizablePanel>
</ResizablePanelGroup>

Accessibility

  • Built on react-resizable-panels
  • Keyboard: Arrow keys to resize when handle is focused
  • Handle is focusable with visible focus indicator
  • Screen reader: announces panel sizes
  • Add aria-label on panels for context

Gotchas

ProblemSolution
Panels collapse unexpectedlySet minSize prop on panels
A panel is a few pixels wideSizes are percentage strings ("25%"). react-resizable-panels v4 reads a bare number as pixels
direction has no effectv4 renamed it orientation
No visible handleAdd withHandle prop to ResizableHandle
Content overflows panelAdd overflow-hidden or overflow-auto to panel
Height not filling containerSet explicit height on PanelGroup or parent

See Also


Last updated: February 9, 2026

TimelyCare Design System

v0.14.0