PaneGroup
A container for panes or nested pane groups.
The PaneGroup
component wraps a collection of panes or nested PaneGroup
s and is used to initialize and manage the layout of the panes.
Props
The direction of the panes in the group. If set to 'horizontal'
, the panes will be arranged side by side. If set to 'vertical'
, the panes will be arranged one on top of the other.
The underlying DOM element of the pane group. You can bind
to this prop to get a reference to the element.
Imperative API for the pane group. bind
to this prop to get access to methods for controlling the pane group.
Persisted Layouts/Storage
When the PaneGroup
component is provided with an autoSaveId
prop, it will automatically save the layout of the panes to local storage. If you want to use a different storage mechanism, you can provide a storage
prop with a custom storage object that implements the PaneGroupStorage
interface.
export type PaneGroupStorage = {
/** Retrieves the item from storage */
getItem(name: string): string | null;
/** Sets the item to storage */
setItem(name: string, value: string): void;
};
Data Attributes
The following data attributes are available for the PaneGroup
component:
export type PaneGroupAttributes = {
/** Applied to every pane group element. */
"data-pane-group": "";
/** The direction of the pane group. */
"data-direction": "horizontal" | "vertical";
/** The ID of the pane group. */
"data-pane-group-id": string;
};