Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Build accessible, unstyled Vue 3 components using Reka UI (formerly Radix Vue) with WAI-ARIA compliance.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
components/listbox.md
1# Listbox23Accessible list selection45**Parts:** `ListboxRoot`, `ListboxContent`, `ListboxFilter`, `ListboxItem`, `ListboxItemIndicator`, `ListboxGroup`, `ListboxGroupLabel`, `ListboxVirtualizer`67## ListboxRoot89### Props10| Prop | Type | Default |11|------|------|---------|12| `as` | `AsTag \| Component` | `"div"` |13| `asChild` | `boolean` | - |14| `by` | `string \| ((a: AcceptableValue, b: AcceptableVal...` | - |15| `defaultValue` | `AcceptableValue \| AcceptableValue[]` | - |16| `dir` | `"ltr" \| "rtl"` | - |17| `disabled` | `boolean` | - |18| `highlightOnHover` | `boolean` | - |19| `modelValue` | `AcceptableValue \| AcceptableValue[]` | - |20| `multiple` | `boolean` | - |21| `name` | `string` | - |22| `orientation` | `"vertical" \| "horizontal"` | `"vertical"` |23| `selectionBehavior` | `"toggle" \| "replace"` | `"toggle"` |2425### Emits26| Event | Payload |27|-------|---------|28| `entryFocus` | `[event: CustomEvent<any>]` |29| `highlight` | `[payload: { ref: HTMLElement; value: Acceptable...` |30| `leave` | `[event: Event]` |31| `update:modelValue` | `[value: AcceptableValue]` |3233### Slots34| Slot | Type |35|------|------|36| `modelValue` | `AcceptableValue \| AcceptableValue[] \| undefined` |3738## ListboxContent3940### Props41| Prop | Type | Default |42|------|------|---------|43| `as` | `AsTag \| Component` | `"div"` |44| `asChild` | `boolean` | - |4546## ListboxFilter4748### Props49| Prop | Type | Default |50|------|------|---------|51| `as` | `AsTag \| Component` | `"input"` |52| `asChild` | `boolean` | - |53| `autoFocus` | `boolean` | - |54| `modelValue` | `string` | - |5556### Emits57| Event | Payload |58|-------|---------|59| `update:modelValue` | `[string]` |6061### Slots62| Slot | Type |63|------|------|64| `modelValue` | `string \| undefined` |6566## ListboxItem6768### Props69| Prop | Type | Default |70|------|------|---------|71| `as` | `AsTag \| Component` | `"div"` |72| `asChild` | `boolean` | - |73| `disabled` | `boolean` | - |74| `value`* | `AcceptableValue` | - |7576### Emits77| Event | Payload |78|-------|---------|79| `select` | `[event: SelectEvent<AcceptableValue>]` |8081## ListboxItemIndicator8283### Props84| Prop | Type | Default |85|------|------|---------|86| `as` | `AsTag \| Component` | `"span"` |87| `asChild` | `boolean` | - |8889## ListboxGroup9091### Props92| Prop | Type | Default |93|------|------|---------|94| `as` | `AsTag \| Component` | `"div"` |95| `asChild` | `boolean` | - |9697## ListboxGroupLabel9899### Props100| Prop | Type | Default |101|------|------|---------|102| `as` | `AsTag \| Component` | `"div"` |103| `asChild` | `boolean` | - |104| `for` | `string` | - |105106## ListboxVirtualizer107108### Props109| Prop | Type | Default |110|------|------|---------|111| `estimateSize` | `number` | - |112| `options`* | `AcceptableValue[]` | - |113| `textContent` | `((option: AcceptableValue) => string)` | - |114115### Slots116| Slot | Type |117|------|------|118| `option` | `string \| number \| false \| true \| Record<string,...` |119| `virtualizer` | `Virtualizer<Element \| Window, Element>` |120| `virtualItem` | `VirtualItem<Element>` |121