Raft Design System

Components · Layout

Resizable

Columns or rows whose split people drag, with the drag handle sitting on the seam between them, or in the gap between cards that have no seam.

StableAlso called Split view, Splitter, Resize handle
import { Resizable } from "@botiverse/raft-ui";

Resizable lets people drag the boundary between two regions to change how much room each one gets: the sidebar and the main area, or a conversation and its thread. The seam between the two columns is the only line, and the drag handle sits on it (Built from existing parts). Cards laid out in a panel have no seam, so their handle is the gap between them (The gap handle).

app-shell/compositions/collapsible-sidebar

When to use

SituationUse
A split people adjust: the sidebar, the thread panelResizable
Widths fixed by the designThe slots of AppShell, or plain layout
A side panel that opens and closes beside the main areaA Panel in the shell
Details that cover the page for a whileDrawer

Anatomy

  • ResizableGroup: the container. orientation="horizontal" (the default) puts its panels side by side; orientation="vertical" stacks them. Required.
  • ResizablePanel: one region, with its default, minimum and maximum size. At least 2.
  • ResizableHandle: the drag handle between two panels. Required between every adjacent pair: a group without handles is plain layout.

The panels draw no surface, edge or padding. The region inside each panel draws its own, including the one seam between the two (Page structure).

Variants

VariantUse for
On a seamColumns that meet at a seam: the sidebar and the main area, a conversation and its thread, a channel's side columns and the sections stacked in them. The default, drawn by ResizableHandle
In a gapCards laid out in a panel with a 12px gap around them. No layout uses it today: the channel's side cards it was made for are now side sections in columns that meet at seams (The channel's side columns)

The gap handle

Cards laid out in a panel have no seam to drag: each card draws its own edge, and the 12px between it and its neighbor is empty. So the handle is the gap itself: the 12px beside the cards and the 12px between two stacked cards. A line drawn in the gap would be the seam the cards were laid out without, so the handle shows a short bar instead, which reads as a grip, not as an edge.

StateLook
At restNothing
HoverA 56 × 4px bar along the gap, its center following the pointer and kept half a bar inside each end, line-seam, with round ends (rounded-full) like the Drawer's grab handle, after a 150ms pause so a pointer passing over doesn't flash it; a Resize tooltip and the resize cursor
DraggingThe bar in foreground-muted, staying where the drag started
Keyboard focusThe bar in foreground, in the middle of the gap
  • The bar follows the pointer because a gap has no line: the bar is the only thing that marks where the hand is, and a bar fixed in the middle of a long edge looks unrelated to the pointer. A touch has no hover to follow, so there the bar stays in the middle.
  • The hit area is the whole 12px gap along the card, 24px under a coarse pointer, so it takes no room from the cards. A double click puts the size back to its default.
  • Where two gaps cross, the 12px square where they meet (24px by touch) drags both at once with the move cursor, as at a grid's crossing, and hovering or dragging it lights both bars where they meet: the one along the crossing gap at the pointer, the other at its end against the corner. A double click on it resets both. The square is for the pointer only: each gap keeps its own keyboard handle, a focusable separator like a seam's.
  • ResizableHandle draws only the seam handle today.

States

These are the states of the handle on a seam; the gap handle's are in The gap handle.

StateLook
At restNothing: the seam drawn by the region shows where the handle is
Hover, draggingA 1px foreground-muted line over the seam, and a resize cursor
Keyboard focusA 2px foreground line over the seam

Behavior

  • The handle is 12px wide and lies over the start of the panel after the boundary (to its right, or below it), so it takes no room from either panel; its line is still drawn on the seam. Under a coarse pointer (a finger on a tablet) it is 24px wide.
    • Why after the boundary, not centered on it: a panel's scrollbar runs along its end edge, the seam's other side. Centered, the handle covered the scrollbar's last 6px, where the thumb is, and took its drag: on the Raft app's Activity list the thumb couldn't be dragged (InNOut, 2026-11-09, #proj-raft-ui:21bae128). The start of the panel after a seam never has a scrollbar.
  • A double click on the handle puts the column back to its default width.
  • Use the widths in Spacing for the default, minimum and maximum: every column has its own range, and the sidebar keeps one width on every page (Resizing columns).
  • Pass groupResizeBehavior="preserve-pixel-size" on the sidebar's panel, so the sidebar keeps its width when the window changes and the main area takes up the difference.
  • In a conversation's row every seam trades width between its two neighbours, and once the shrinking one is down to 160px the drag goes on taking from the next column further out on that side (the cascade); a column's content keeps its own minimum and is clipped under it. What a release shows is what is saved (The channel's side columns).
  • Below 768px there are no side-by-side columns to resize in Raft Chat; a server's public page keeps its columns from 640px (Responsive layout).

Dragging past the end

A drag that reaches the end of the sidebar's range and keeps going changes the layout's state instead of stopping: the sidebar snaps to its next state, and that jump is how people know they went past the end (stdrc, 2026-10-23).

  • The sidebar collapses. Drag it to its minimum and 40px further toward the edge: it collapses at once, while the drag is still held.
  • Nothing else snaps. A seam in a conversation's row doesn't stop at a minimum: it carries on into the next column, each down to 160px (Behavior). A thread is expanded by the Expand in its head, as every column is, not by a drag past the end (Panel; stdrc, 2026-11-03 and 2026-11-04, #proj-raft-ui:#189).
  • It switches during the drag, not on release. Dragging back across the line, still held, undoes it; releasing keeps whichever state is showing. A preview that only switches on release has no jump, and the jump is the point: VS Code's sidebar and macOS split views snap the same way.
  • 40px, not a touch. The extra 40px keeps a drag that just reaches the end from snapping by accident.
  • The width comes back. The width the sidebar had before it snapped is remembered, and expanding the sidebar brings it back. A double click on the handle still resets to the default width.
  • The keyboard reaches it. Enter on the handle collapses or restores the sidebar, as for any collapsible panel (Accessibility), so the state doesn't need a pointer.

Accessibility

  • Resizable wraps react-resizable-panels. Each ResizableHandle is a focusable separator with aria-valuenow, aria-valuemin, aria-valuemax and aria-controls.
  • Keyboard: the arrow keys along the group's orientation resize in small steps, Home and End go to the minimum and the maximum, Enter collapses or restores a collapsible panel, and F6 moves to the next handle.
  • Give every handle an aria-label that says what it resizes: "Resize sidebar".

Rules

  • Use Resizable only for splits people adjust. Don't wrap fixed layouts in a group in case they might be resized later.
  • Don't draw a line on a seam's handle or a second edge on the panels: the seam of the region is the only line. A gap handle draws only its short bar, and only on hover, drag and focus.

API

ResizableGroup, ResizableHandle, ResizablePanel

Takes the attributes of its element.

Changes

  • 0.25.0 · Design SystemThe gap handle's bar follows the pointer: on hover, the 56 × 4px bar in a gap between side cards is centered on the pointer along the gap, kept half a bar inside each end, with round ends; while dragging it stays where the drag started, and with keyboard focus it sits in the middle. Where two gaps cross, the crossing gap's bar lights at the pointer and the other at its end against the corner. ResizableHandle still draws only the seam handle; products draw the gap handle themselves.
  • 0.0.21 · AddedAdded generic ResizableGroup, ResizableHandle, and ResizablePanel primitives for resizable panel layouts.