| Prop | Default | Type |
|---|---|---|
as | 'div' | AsTag | ComponentThe element or component this component should render as. Can be overwritten by |
asChild | booleanChange the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details. | |
collapsedSize | numberThe size of panel when it is collapsed. | |
collapsible | booleanShould panel collapse when resized beyond its | |
defaultSize | numberInitial size of panel (numeric value between 1-100) | |
id | stringPanel id (unique within group); falls back to | |
maxSize | numberThe maximum allowable size of panel (numeric value between 1-100); defaults to | |
minSize | numberThe minimum allowable size of panel (numeric value between 1-100); defaults to | |
order | numberThe order of panel within group; required for groups with conditionally rendered panels |
| Emit | Payload |
|---|---|
collapse | []Event handler called when panel is collapsed. |
expand | []Event handler called when panel is expanded. |
resize | [size: number, prevSize: number]Event handler called when panel is resized; size parameter is a numeric value between 1-100. |
| Slots (default) | Payload |
|---|---|
isCollapsed | booleanIs the panel collapsed |
isExpanded | booleanIs the panel expanded |
collapse | (): voidIf panel is |
expand | (): voidIf panel is currently collapsed, expand it to its most recent size. |
resize | (size: number): voidResize panel to the specified percentage (1 - 100). |
| Methods | Type |
|---|---|
collapse | () => voidIf panel is |
expand | () => voidIf panel is currently collapsed, expand it to its most recent size. |
getSize | () => numberGets the current size of the panel as a percentage (1 - 100). |
resize | (size: number) => voidResize panel to the specified percentage (1 - 100). |
