| 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. | |
defaultValue | '' | string | string[]The value of the listbox when initially rendered. Use when you do not need to control the state of the Listbox |
dir | 'ltr' | 'ltr' | 'rtl'The reading direction of the listbox when applicable. |
disabled | false | booleanWhen |
highlightOnHover | booleanWhen | |
modelValue | string | string[]The controlled value of the listbox. Can be binded with | |
multiple | booleanWhether multiple options can be selected or not. | |
name | stringThe name of the field. Submitted with its owning form as part of a name/value pair. | |
orientation | 'horizontal' | 'vertical' | 'horizontal'The orientation of the listbox. |
required | booleanWhen | |
selectionBehavior | 'toggle' | 'replace'How multiple selection should behave in the collection. |
| Emit | Payload |
|---|---|
entryFocus | [event: CustomEvent<any>]Event handler called when container is being focused. Can be prevented. |
highlight | [payload: { ref: HTMLElement; value: AcceptableValue; }]Event handler when highlighted element changes. |
leave | [event: Event]Event handler called when the mouse leaves the container |
update:modelValue | [value: AcceptableValue]Event handler called when the value changes. |
| Slots (default) | Payload |
|---|---|
modelValue | string | string[] | undefined |
