Reka UI logoReka
backdrop
PropDefaultType
as
'div'
AsTag | Component

The element or component this component should render as. Can be overwritten by asChild.

asChild
boolean

Change the default rendered element for the one passed as a child, merging their props and behavior.

Read our Composition guide for more details.

collapsedSize
number

The size of panel when it is collapsed.

collapsible
boolean

Should panel collapse when resized beyond its minSize. When true, it will be collapsed to collapsedSize.

defaultSize
number

Initial size of panel (numeric value between 1-100)

id
string

Panel id (unique within group); falls back to useId when not provided

maxSize
number

The maximum allowable size of panel (numeric value between 1-100); defaults to 100

minSize
number

The minimum allowable size of panel (numeric value between 1-100); defaults to 10

order
number

The order of panel within group; required for groups with conditionally rendered panels

EmitPayload
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
boolean

Is the panel collapsed

isExpanded
boolean

Is the panel expanded

collapse
(): void

If panel is collapsible, collapse it fully.

expand
(): void

If panel is currently collapsed, expand it to its most recent size.

resize
(size: number): void

Resize panel to the specified percentage (1 - 100).

MethodsType
collapse
() => void

If panel is collapsible, collapse it fully.

expand
() => void

If panel is currently collapsed, expand it to its most recent size.

getSize
() => number

Gets the current size of the panel as a percentage (1 - 100).

resize
(size: number) => void

Resize panel to the specified percentage (1 - 100).