Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

Resizable

A workspace inspector with resizable panels.

Preview

Live preview

Changes apply to this preview only.

Inspector

A canvas and a properties panel.

Canvas
PROPERTIESRadius · mdDensity · comfortableTheme · light

Diff view

Before and after, with a vertical split.

- border-radius: 8px;
- box-shadow: none;
+ border-radius: var(--pimolu-radius-lg);
+ box-shadow: var(--pimolu-shadow-md);

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Horizontal split

A file list next to a read-only preview. The separator keeps pointer capture during a drag and exposes aria-valuenow.

Open preview

Vertical split

The same component stacked: the separator becomes horizontal and the arrow keys follow the axis.

Open preview

Constraints

Each pane keeps its own minimum. The start pane also respects maxSize, so 100% is never reachable by accident.

Open preview

Usage

Set useful minimum sizes and keep panel state in the surrounding workspace when persistence is needed.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluResizableProps

Type source
PimoluResizableProps public API
NameTypeDefaultDescription
childrenRequired[ReactNode, ReactNode]—Exactly two panes: the start pane, then the end pane.
orientationPimoluResizableOrientation | undefined"horizontal"Layout direction. "horizontal" places the panes side by side and "vertical" stacks them. Defaults to "horizontal".
sizesPimoluResizableSizes | undefined—Controlled sizes, as percentages of the available space.
defaultSizesPimoluResizableSizes | undefined[50, 50]Initial sizes when uncontrolled. Defaults to [50, 50].
onSizesChange((sizes: PimoluResizableSizes) => void) | undefined—Called with the normalized sizes whenever the split changes.
minSizenumber | PimoluResizableSizes | undefined10Minimum size of each pane, as a percentage. A single number applies to both panes; a tuple sets them independently. Defaults to 10.
maxSizenumber | undefined90Maximum size of the start pane, as a percentage. Defaults to 90.
stepnumber | undefined1Keyboard increment, as a percentage. Defaults to 1.
resetSizesPimoluResizableSizes | undefined—Sizes restored on a separator double-click.
onReset((sizes: PimoluResizableSizes) => void) | undefined—Called after a double-click reset, with the restored sizes.
separatorLabelstring | undefined"Resize panels"Accessible name of the separator. Defaults to "Resize panels".
disabledboolean | undefinedfalseDisables pointer, keyboard and reset interactions.
paneClassNamestring | undefined—Class applied to both panes.
separatorClassNamestring | undefined—Class applied to the separator.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
onClickMouseEventHandler<HTMLDivElement> | undefined—Standard React/HTML attribute.
childrenRequired

[ReactNode, ReactNode]

No default extracted.

Exactly two panes: the start pane, then the end pane.

orientation

PimoluResizableOrientation | undefined

Default: "horizontal"

Layout direction. "horizontal" places the panes side by side and "vertical" stacks them. Defaults to "horizontal".

sizes

PimoluResizableSizes | undefined

No default extracted.

Controlled sizes, as percentages of the available space.

defaultSizes

PimoluResizableSizes | undefined

Default: [50, 50]

Initial sizes when uncontrolled. Defaults to [50, 50].

onSizesChange

((sizes: PimoluResizableSizes) => void) | undefined

No default extracted.

Called with the normalized sizes whenever the split changes.

minSize

number | PimoluResizableSizes | undefined

Default: 10

Minimum size of each pane, as a percentage. A single number applies to both panes; a tuple sets them independently. Defaults to 10.

maxSize

number | undefined

Default: 90

Maximum size of the start pane, as a percentage. Defaults to 90.

step

number | undefined

Default: 1

Keyboard increment, as a percentage. Defaults to 1.

resetSizes

PimoluResizableSizes | undefined

No default extracted.

Sizes restored on a separator double-click.

onReset

((sizes: PimoluResizableSizes) => void) | undefined

No default extracted.

Called after a double-click reset, with the restored sizes.

separatorLabel

string | undefined

Default: "Resize panels"

Accessible name of the separator. Defaults to "Resize panels".

disabled

boolean | undefined

Default: false

Disables pointer, keyboard and reset interactions.

paneClassName

string | undefined

No default extracted.

Class applied to both panes.

separatorClassName

string | undefined

No default extracted.

Class applied to the separator.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

onClick

MouseEventHandler<HTMLDivElement> | undefined

No default extracted.

Standard React/HTML attribute.

Accessibility

  • Verify separator keyboard resizing and keep content usable at its minimum size.
Read the accessibility guide →