Skip to content
GitHub (opens in a new tab)

Resizable

Two panels split by a separator you can drag or resize from the keyboard.

stableOrganismcontracts/resizable.json

Preview

Resizable

Two panels and a separator. Drag it, or focus it and use the arrow keys. Shift steps further. Home and End go to the limits.

Master

horizontal is left and right. vertical is top and bottom. A fixed sidebar is SideNav.

List. 40%

Detail

Usage

size is the start panel, from 0 to 100. min and max keep the drag inside a range.

Do's

  • A list beside a detail, or a preview beside its controls
  • The person should choose how much room each side gets

Don'ts

  • A fixed sidebar — use SideNav
  • A page split that should not move — use layout, not Resizable
<Resizable orientation="horizontal" start={<p>List</p>} end={<p>Detail</p>} />

When to use

  • A list beside a detail, or a preview beside its controls
  • The person should choose how much room each side gets

When not to use

  • A fixed sidebar — use SideNav
  • A page split that should not move — use layout, not Resizable

What an agent reads

import { Resizable } from "agentic-ds-kit";
must
  • The separator is role=separator with aria-orientation, aria-valuenow, aria-valuemin, and aria-valuemax
  • Arrow keys resize. Shift steps by 10. Home and End go to min and max
  • The separator is in the tab order
  • Dragging the separator resizes the start panel
defaults
  • orientation horizontal
  • defaultSize 50
  • min 20
  • max 80
  • startLabel Start panel
  • endLabel End panel
  • ariaLabel Resize panels
stops if
  • Do not use Resizable for app navigation — use SideNav
  • Do not hide the separator
  • Do not use raw hex

From contracts/resizable.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

Props

NameTypeRequiredDefaultNotes
orientationhorizontal | verticalNohorizontalhorizontal is left and right. vertical is top and bottom.
sizenumberNo—Controlled start-panel size, 0 to 100.
defaultSizenumberNo50—
minnumberNo20—
maxnumberNo80—
onSizeChangefunctionNo—(size: number) => void
startslotYes——
endslotYes——
startLabelstringNoStart panel—
endLabelstringNoEnd panel—
ariaLabelstringNoResize panels—
  • Component
    →

    SideNav

    Product side nav: brand header, icon items, optional badges, closeable; variant single (one column that closes to an icon rail) or rail-subnav (a fixed icon rail plus a SideNav.SubNav column with the picked parent's rows).