DreamLake

ResizableLayout

A three-column drag-to-resize layout. Column widths are proportional (flex-based) by default so the layout responds to any container size, but the left and middle columns can each opt into a fixed pixel mode via leftFixedPx and middleFixedPx. Widths are persisted to localStorage via storageKey. Each divider reveals a cursor-following frosted pill on hover/drag (.uikit-grip-pill: a hairline ring that sharpens on hover and takes the accent while held, in light and dark). No line is drawn along the seam; PanelLayout dividers show the same pill.

Demo

Drag the dividers to resize. All three columns are resizable by default. Hover a divider to see the pill track the cursor.

left
middle
right

Without divider indicator

showDivider={false} hides the pill entirely. The drag area remains active — hover and drag work as before.

left
middle
right

Custom gap

gap controls the visual space between columns in pixels (default 24). With gap={0} columns sit flush; the divider's hit area stays at least 20px wide so the resize handle is always grabbable.

left
middle
right

Hidden columns + fullscreen

leftHidden, middleHidden, and rightHidden each collapse a column to zero width with an opacity fade. To make one column take the full viewport ("fullscreen"), hide the other two together — there's no dedicated fullscreen prop because two hidden columns already express the intent.

·
left
middle
right

Compact panels

Compact layouts accept compactLeading for controls in the existing TabRow leading slot, including with one visible panel. Compact labels align vertically with 32px navigation controls while desktop row spacing is unchanged.

Use compact at the application's narrow-screen breakpoint to present one panel at full width. The shared TabRow lets users reach every non-hidden panel with pointer or keyboard navigation. compactLabels supplies product-specific names. Inactive panels remain mounted, so drafts and editor state survive panel switches and returning to the desktop layout. Desktop widths and persisted sizes are retained.

The initial panel is middle, or the first available panel when it is hidden. Use defaultCompactPanel="right" for an initially detail-focused view, or control selection with compactPanel and onCompactPanelChange when opening a resource should show its details. Hidden panels do not appear in the selector. A single visible panel fills the layout without a selector. Inactive compact panels are inert, and focus moves into the visible panel if a breakpoint change would hide the focused editor.

Props

PropTypeDefaultDescription
compactbooleanfalseShow one full-width panel with a shared tab selector. The caller owns the breakpoint.
compactLabels{ left?: string; middle?: string; right?: string }Navigation / Content / DetailsAccessible panel names.
compactPanel'left' / 'middle' / 'right'—Controlled compact panel selection; unavailable panels fall back to a visible panel.
defaultCompactPanel'left' / 'middle' / 'right''middle'Initial uncontrolled compact selection.
onCompactPanelChange(panel) => void—Called when users select a compact panel.
leftReactNode—Content for the left column.
middleReactNode—Content for the middle column.
rightReactNode—Content for the right column.
topReactNode—Optional content rendered above all columns (e.g. a toolbar).
showDividerbooleantrueShow the cursor-following pill on dividers. The drag area is always active.
gapnumber24Visual width of the space between columns in px. The divider's interactive hit area stays at least 20px wide even when gap is smaller, so the resize handle is always grabbable.
paddingnumber12Outer padding from the layout's container edges in px. Set to 0 for designs where the layout sits flush with the viewport.
defaultWidths{ left?: number; middle?: number; right?: number }2/3/5Initial flex weights for each column. Ignored for any column that opts into a fixed-px mode (leftFixedPx, middleFixedPx).
minWidths{ left?: number; middle?: number; right?: number }80pxMinimum pixel width per column, enforced during drag-resize.
leftFixedPxnumber—Pin the left column to a fixed-but-resize-adjustable pixel width that never grows with the viewport. The left-middle drag mutates it 1:1 (clamped by minWidths), trading width with the middle column; the right column keeps its width. Persisted as leftPx with storageKey.
middleFixedPxnumber—Pin the middle column to a fixed-but-resize-adjustable pixel width. The middle-right drag mutates the value 1:1 (clamped by minWidths.middle); the right column takes the remaining width. Pair with storageKey to persist the px value.
storageKeystring—localStorage key to persist column widths across sessions.
leftHiddenbooleanfalseCollapse the left column.
middleHiddenbooleanfalseCollapse the middle column.
rightHiddenbooleanfalseCollapse the right column.
leftResizablebooleantrueEnable drag-to-resize on the left divider.
rightResizablebooleantrueEnable drag-to-resize on the right divider.
classNamestring—Extra classes on the root element.

Responsive collapse threshold

Set compactBreakpoint={768} to keep adjacent panels visible on tablets and show one panel below 768 CSS pixels. The default is no automatic collapse; compact overrides the breakpoint when supplied. Hidden panels stay mounted across the transition.