On this page

Resizable panel

Active guidance for source-owned, state-preserving split panes.

Ownership and when to use

ResizablePanel comes from @beehexa/vue-components, owned by beehexa.design. It is an implemented Vue 3 component, not an Ant Design Vue recipe or a consumer-owned splitter. Its only runtime dependency is the source design-token package; Vue 3.5+ is a peer. Use it for source/preview editors, diagram/workflow panes, comparison surfaces and genuinely resizable drawer composition. Use native layout primitives for ordinary static layout; do not make the app navigation resizable.

Bounded layout

Give the component a definite available height and width. Surrounding flex/grid items must permit shrinkage with min-width: 0 and min-height: 0; do not derive a new container height from Monaco’s content or a Mermaid SVG’s intrinsic height. The two panes plus the source-token divider gutter sum to the host’s available space. The gutter is a real in-flow sibling, not a hitbox over a pane scrollbar. The handle fits inside that gutter, clear of clipped pane content and scroll targets. At rest neither the root nor panes create a stacking context: nested fixed Monaco, workflow or inspection overlays participate in their actual parent’s overlay stack, above the outer separator. Do not add permanent pane z-index or root isolation to raise the handle; they trap a nested fullscreen below its sibling divider. The pane wrappers are shrinkable column flex containers: a fill-layout Card, editor or canvas can flex into the complete pane. Do not replace that flow with intrinsic content sizing or add a second scroll owner around a bounded child.

horizontal means left/right panes; vertical means top/bottom panes. The consumer selects direction using its existing breakpoint rules. There is no hardcoded app breakpoint inside the library. Keep the same component and slot children when direction changes on mobile, when fullscreen opens, or when a pane is hidden.

Preserve state

Bind the first-pane fraction of pane space excluding the gutter with v-model:ratio. secondVisible=false fills the host with the first pane and hides/inerts the second without unmounting it. Showing it restores the retained requested ratio. Zero-size panes also stay mounted: use min=0 when true edge collapse is intended. Do not key models, editors, canvases or the panel on ratio, direction, visibility or resize-event dimensions. Do not reset model contents, zoom or fullscreen merely to force measurement. The focused separator owns its keys even while the pointer remains over a native Workflow Canvas. Its existing native element carries the SDK’s documented .nokey opt-out; the marker is not placed on either pane or the panel root, so graph navigation remains active inside the canvas. Do not intercept document events, disable the graph keymap or add a consumer DOM patch to arbitrate them.

min reserves CSS pixels for each pane, max caps the first pane, and minRatio/maxRatio constrain its fraction. Pixel minima and maxima are calculated after reserving the actual gutter, including reader/coarse-pointer scaling. If the host cannot fit both pixel minima, those minima relax symmetrically rather than causing overflow. Explicit maximums win incompatible minima. Temporary constraints preserve the requested ratio. Equal effective bounds disable resizing but retain the gutter; equal endpoint bounds additionally remove the gutter for a retained fullscreen pane (min=0). Hiding the second pane also removes it.

For a full document page whose intrinsic heading can exhaust the available height, preserveMinimum keeps the existing min allocation for each visible pane plus the uncapped source interaction gutter along the active axis. The ancestor document scroller must expose the resulting overflow. Hiding the second pane retains only one minimum; direction changes move the constraint to the other axis without remounting children. The default remains bounded, symmetric minimum relaxation. This is not a readable-renderer minimum and must not force mobile panes to the SDK surface’s 350px-equivalent allocation.

Divider, theme and feedback

The default visible divider line is centered at 90% cross-axis length, leaving 5% at each end. Its handle stays centered at 50%, above both panes. The physical gutter uses resize.target / resize.touchTarget and contains the complete pointer hit region, keeping it off pane scrollbars. resizerSize changes only the visible line. The handle contains exactly three circular dots, equally spaced and symmetric about its own center on both axes: vertical for left/right panes, horizontal for top/bottom panes. resize.dot.size and resize.dot.pitch own fixed ink geometry; no repeating gradient, cropped remainder or consumer offset determines the count.

resize.* owns line/grip/background/active paint and handle geometry. Source border and spacing tokens own focus and grip details. Import the package’s typed CSS entry once; it includes design-token CSS. Light/dark changes follow the source root theme live, and rem-based geometry respects reader scaling. No arbitrary AntD selector, body cursor or global high-z overlay is added. Only an active pointer gesture temporarily isolates the root and panes beneath its local drag shield, keeping editor/iframe content from intercepting that gesture. Gesture termination removes the shield and its stacking contexts. Geometry never animates.

Resize consumers

Listen to resize for measured pane dimensions after layout. Use those measurements to ask retained Monaco/Mermaid/workflow instances to update their layout. The payload contains ratio, direction, first/second width and height, and pointer, keyboard, container or programmatic source. A hidden second pane reports zero dimensions while the split ratio is retained. Interactive gestures also emit resize-start and resize-end; container/programmatic updates do not invent interactive lifecycles. See Code for the complete contract and Accessibility for keyboard and naming requirements.