Reka UI logoReka
backdrop
PropDefaultType
as
'ul'
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.

bubbleSelect
boolean

When true, selecting children will update the parent state.

defaultExpanded
string[]

The value of the expanded tree when initially rendered. Use when you do not need to control the state of the expanded tree

defaultValue
Record<string, any> | Record<string, any>[]

The value of the tree when initially rendered. Use when you do not need to control the state of the tree

dir
'ltr' | 'rtl'

The reading direction of the listbox when applicable.
If omitted, inherits globally from ConfigProvider or assumes LTR (left-to-right) reading mode.

disabled
boolean

When true, prevents the user from interacting with tree

expanded
string[]

The controlled value of the expanded item. Can be binded with with v-model.

getChildren
val.children
((val: Record<string, any>) => Record<string, any>[])

This function is passed the index of each item and should return a list of children for that item

getKey*
(val: Record<string, any>): string

This function is passed the index of each item and should return a unique key for that item

items
Record<string, any>[]

List of items

modelValue
Record<string, any> | Record<string, any>[]

The controlled value of the tree. Can be binded with with v-model.

multiple
boolean

Whether multiple options can be selected or not.

propagateSelect
boolean

When true, selecting parent will select the descendants.

selectionBehavior
'toggle'
'replace' | 'toggle'

How multiple selection should behave in the collection.

EmitPayload
update:expanded
[val: string[]]
update:modelValue
[val: Record<string, any> | Record<string, any>[]]

Event handler called when the value of the toggle changes.

Slots (default)Payload
flattenItems
FlattenedItem<Record<string, any>>[]
modelValue
Record<string, any> | Record<string, any>[]
expanded
string[]