Skip to main content

API Overview

For most purposes the Allotment component is all that is needed. Consider using the Allotment.Pane sub-component if you need more fine-grained control over the individual panes.

Exports​

Everything below is exported from the allotment package.

ExportKindDescription
AllotmentComponentThe split view. Each child becomes a pane. See Allotment.
Allotment.PaneComponentWraps a child to set per-pane options such as sizes and snapping. See Pane.
LayoutPriorityEnumLow, Normal or High, for the priority prop on Allotment.Pane. See Pane.
setSashSizeFunction(size: number) => void. Sets the size of the draggable area between panes, for every Allotment on the page. See Styling.
AllotmentHandleTypeThe ref handle, with the reset and resize methods. See Ref methods.
AllotmentPropsTypeThe props accepted by Allotment.

The stylesheet is published separately and must be imported once, usually at the root of your app:

import "allotment/dist/style.css";