Resizable Panel

Panels side by side or stacked, with handles to drag, or move with the arrow keys, to resize them.
Stable
Web
iOS
Android
@advui/core
Source

Side by side

TownshipsHakha, Sittwe, Labutta, Myitkyina
HakhaChin State · 14 organizations · 32 projects

Installation

pnpm
pnpm add @advui/core
npm
npm install @advui/core

Usage

import { Resizable } from '@advui/core'

<Resizable height={320}>
  <Resizable.Panel defaultSize={30} minSize={20}>…</Resizable.Panel>
  <Resizable.Handle withHandle aria-label="Resize sidebar" />
  <Resizable.Panel>…</Resizable.Panel>
</Resizable>

Examples

Stacked

QuerySELECT township, COUNT(*) FROM activities GROUP BY township
Results330 townships · 0.4 s

Three panels, collapsible

Controlled sizes. Focus a handle and press Enter to close or reopen a side panel.
FiltersSector, state, status
Activities1,248 results
DetailsPick an activity
25% · 45% · 30%

API reference

Resizable

The group. Also takes View props; give it a height for side-by-side panels.
PropTypeDefaultDescription
direction'horizontal' | 'vertical''horizontal'Side by side, or stacked.
sizesnumber[]—Panel sizes in percent (controlled). They add up to 100.
onSizesChange(sizes: number[]) => void—Called with the new `sizes`.
onSizesCommit(sizes: number[]) => void—A drag or key press ended. Save the layout here.
keyboardStepnumber5Percent moved by one arrow key press.
labelsPartial<ResizableLabels>—Default handle name ("Resize"), for translation.

Resizable.Panel

Also takes View props.
PropTypeDefaultDescription
defaultSizenumber—Starting size in percent. Default: an equal share of what is left.
minSizenumber—Smallest size, in percent of the group.
maxSizenumber—Largest size, in percent of the group.
collapsiblebooleanfalseDragging below half of `minSize` closes it; Enter on the handle closes and reopens it.
collapsedSizenumber0Size when collapsed, in percent.

Resizable.Handle

Place one between each pair of panels.
PropTypeDefaultDescription
aria-labelstring—Say what it resizes: "Resize sidebar".
withHandlebooleanfalseShows a grip on the line.
disabledbooleanfalseFixes the sizes.

Accessibility

  • Each handle is a focusable separator (the WAI-ARIA window splitter) with aria-valuenow as the size of the panel before it, its limits, and aria-controls pointing at that panel.
  • Name every handle by what it resizes ("Resize filters").
  • On iOS and Android the handle is an adjustable element: swipe up or down with VoiceOver or TalkBack to resize, and double-tap to close or reopen a collapsible panel.
  • A panel collapsed to 0 is hidden, so its content leaves the tab order.
Keyboard interactions
KeyAction
Arrow keysMove the focused handle (left/right, or up/down when stacked).
Home / EndMake the panel before it as small or as large as it can be.
EnterClose or reopen a collapsible panel.

Responsive behavior

Sizes are percentages, so panels keep their shares as the window changes. On phones prefer direction="vertical" or a Tabs layout.

Platform notes

Web
Drag with a mouse, pen or finger (pointer capture), or use the keyboard.
iOS
Drag the line; its touch area is wider than it looks.
Android
Same as iOS.
Since v0.6.0Last updated Nov 2, 2026Edit this page on GitHub