4.2.0
Core

Resizable

Panels a reader re-proportions by dragging the line between them — for a surface someone lives in long enough to want it their own way.

Resizable

A run list against a run detail. `withHandle` adds the grip because the two panels are the same surface and nothing else would say the divider moves. Colour arrives on interaction only: the line is a hairline at rest and brand while you drag it. Every size carries a unit — see *Fixed and fluid panels* for what a bare number does instead.

Runs today
EnrichmentWorking on it
DedupeDone
Outreach draftStuck
Sync to CRMDone
run_9f21

Enrichment · 1,204 contacts

Reading the imported batch, resolving each company domain, and writing the firmographic fields back. Started 41 seconds ago.

318 / 1,204 resolved2 skipped

Usage

import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from '@oceanic-hub/brand-system'
<ResizablePanelGroup>
  <ResizablePanel>…</ResizablePanel>
  <ResizableHandle>…</ResizableHandle>
</ResizablePanelGroup>

Composition

Use the following composition to build with Resizable:

ResizablePanelGroup
├── ResizablePanel ×2
└── ResizableHandle

Reach for it where two regions are read together and neither is subordinate: a list beside the record it selects, a transcript over the log that produced it, a diff. The test is whether two readers would honestly want different ratios. A resizable split hands the reader a decision, so a reader dragging your divider on their first visit is correcting your layout rather than expressing a preference — and one ratio that is right for everybody is a div.

It is not responsive layout with a handle on it: a panel does not reflow as it narrows, it only gets narrower, so every panel needs a shape that still works at its own minSize. Two neighbours are close enough to name. A line that divides without moving is a Separator. A rail that collapses, remembers and has a provider of its own is Sidebar — reach for that when the shape is one rail and one body rather than an arbitrary split.

A bare number is PIXELS, and this is the one thing on this page to get right. defaultSize={38} is 38 pixels; the percentage is the string "38%". It stays quiet when you get it wrong, because the group normalises the sizes it is given to fill itself: 38 and 62 read as pixels still normalise to the 38/62 you meant, so the layout looks correct. What breaks it is a minSize the raw number contradicts. defaultSize={38} minSize="220px" asks for a panel smaller than its own minimum, and the engine neither throws nor clamps it to that minimum — it resolves the group to a ratio nobody asked for, a dead 50/50 in that exact case. So: a unit on every size, and every size inside its own minSize/maxSize.

Normalising also means a declared pair lands where you wrote it only when the pair adds up. The robust shape for a fixed rail beside a fluid body is to size the fixed panel and leave the fluid one with no defaultSize at all: it takes the remainder, and the rail is the width you asked for at any container width rather than that width scaled by whatever the siblings declared.

A panel already scrolls its own content, and className is why. The class you pass a ResizablePanel lands on an inner element rather than on the flex item the group sizes — the engine does that so a caller's layout classes cannot fight its own — and that inner element carries overflow: auto. So a panel taller than its share scrolls rather than clipping, and needs no ScrollArea; but a class you expected to size the panel is not on the box being sized.

A saved layout is keyed by panel id, not by position — so inserting a panel does not re-assign every stored size, and a panel with no id cannot be restored. Persist from onLayoutChanged, never onLayoutChange: the second fires on every pointer move, and only the first carries meta.isUserInteraction, which is how a handler avoids writing back the layouts the library computes for itself on mount. The storage half is the engine's own useDefaultLayout hook, deliberately not re-exported here — where a layout is kept is not brand surface.

The grab area is much bigger than the line. The divider stays a 1px hairline while the hit region is 32px on a coarse pointer and 10px on a fine one, computed rather than drawn. 32px is this package's touch floor, raised from the engine's own 20px, because a mis-grab costs more on a resize handle than anywhere else. The keyboard reaches the same layout: the divider is a focusable separator, arrows nudge it five percentage points, Home and End run it to its limits, F6 moves between the handles of one group, and Enter collapses or restores a collapsible panel.

RTL is not supported — recorded in pairings.json under direction: nothing in this package has ever been laid out or measured right-to-left, and upstream ships an RTL example.

Vertical

The axis lives on the GROUP — orientation, not direction, which is what react-resizable-panels renamed it to. Reach for a stacked split when the two regions are a thing and the record of it: side by side would halve both and neither reads well narrow.

Transcript

Find every contact at a company with more than 200 employees that we have not emailed this quarter.

1,204 contacts match. 318 of them sit in accounts an owner has already claimed — excluding those leaves 886.

Run log00:00.4 search_contacts filter=size>200 → 4,91800:01.9 count_activity window=90d → 1,20400:02.6 list_accounts owner=any → 318 claimed00:02.8 done 886 contacts

Nested groups

A group inside a panel is how a console gets both axes, and it is also the clearest argument for the axis living on the group rather than on the handle: this layout has two handles, on two axes, four lines apart. Keep the nesting to one level — a reader who has to re-proportion a tree of splits has been handed a window manager, not a screen.

Transcript

Find every contact at a company with more than 200 employees that we have not emailed this quarter.

1,204 contacts match. 318 of them sit in accounts an owner has already claimed — excluding those leaves 886.

Tools calledsearch_contactslist_accountscount_activity
Run log00:00.4 search_contacts filter=size>200 → 4,91800:01.9 count_activity window=90d → 1,20400:02.6 list_accounts owner=any → 318 claimed00:02.8 done 886 contacts

Without a grip

Leave withHandle off when the two panels are visibly different regions — a change of ground already says where one ends, and the grip would be chrome restating it. Nothing is lost: the bar is still draggable, still focusable, and still turns brand while it moves.

service.ymlname: apiregion: eu-west-1instances: 3healthcheck: /readyz
Plan

3 instances in eu-west-1, rolling.

One instance is replaced at a time and the next waits for its healthcheck, so the service stays up for the whole deploy.

Fixed and fluid panels

A rail of a known width, and a body that takes whatever is left. Size the FIXED panel only — "240px", with a pixel floor and a percentage ceiling — and give the fluid one no defaultSize at all, because the group normalises the sizes it is given to fill itself, so a declared pair lands where you wrote it only when the pair happens to add up. Pair the pixel size with groupResizeBehavior="preserve-pixel-size" and the rail keeps those pixels when the surface around it changes, instead of keeping its share of it.

Environments
production3
staging2
preview1
production

api · worker · edge

The rail opens at 240px and stops at 200px on the way in, so its labels never wrap — however narrow the surface around it gets.

A panel that collapses

collapsible lets a panel be dragged shut past its own minSize: it snaps to collapsedSize and remembers the size it had, so dragging back restores it rather than guessing. Reach for it where the panel is genuinely optional — an inspector, a preview — and not for a rail the screen needs, since a reader who collapses one may never find it again. Enter on the focused divider toggles it, which is the only way to collapse it without a pointer. The width beside Services is this panel's own onResize reporting itself, in pixels.

Servicesinspector 0px
apiDone
workerWorking on it
edgeDone
api

3 instances · eu-west-1

Deployed 41 minutes ago from build 4821. Drag this panel shut and the list keeps the whole width.

API Reference

See the Resizable API page for every prop of every part, with types, defaults and the contract that pins them.

On this page