PaneGroup
A container for panes or nested pane groups.
The PaneGroup
component wraps a collection of Pane
s or nested PaneGroup
s and is used to initialize and manage the layout of the panes.
API Reference
Props
direction
type: 'horizontal' | 'vertical'
The direction of the panes within the group.
required
autoSaveId
type: string
The id to save the layout of the panes to in local storage.
keyboardResizeBy
type: number
The amount of space to add to the pane group when the keyboard resize event is triggered.
onLayoutChange
type: (layout: number) => void | null
A callback called when the layout of the panes within the group changes.
storage
type: PaneGroupStorage
getItem
type: (name: string) => string | null
Retrieves the item from storage.
required
setItem
type: (name: string, value: string) => void
Sets the item to storage.
required
default: localStorage
ref
type: HTMLElement | null
A reference to the underlying DOM element of the pane group. You can bind to this prop to get a reference to the element.
this
type: PaneGroup
Retrieve a reference to the component to access methods for controlling the pane group.
getLayout
type: () => number[]
Get the layout of the pane group.
setLayout
type: (layout: number[]) => void
Set the layout of the pane group.
getId
type: () => string
Get the ID of the pane group.
Data Attributes
The following data attributes are available for the PaneGroup
component:
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.