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/tree.md
1# Tree23Hierarchical tree view45**Parts:** `TreeRoot`, `TreeItem`, `TreeVirtualizer`67## TreeRoot89### Props10| Prop | Type | Default |11|------|------|---------|12| `as` | `AsTag \| Component` | `"ul"` |13| `asChild` | `boolean` | - |14| `defaultExpanded` | `string[]` | - |15| `defaultValue` | `Record<string, any> \| Record<string, any>[]` | - |16| `dir` | `"ltr" \| "rtl"` | - |17| `disabled` | `boolean` | - |18| `expanded` | `string[]` | - |19| `getChildren` | `((val: Record<string, any>) => Record<string, a...` | `val.children` |20| `getKey`* | `(val: Record<string, any>) => string` | - |21| `items` | `Record<string, any>[]` | - |22| `modelValue` | `Record<string, any> \| Record<string, any>[]` | - |23| `multiple` | `boolean` | - |24| `propagateSelect` | `boolean` | - |25| `selectionBehavior` | `"toggle" \| "replace"` | `"toggle"` |2627### Emits28| Event | Payload |29|-------|---------|30| `update:expanded` | `[val: string[]]` |31| `update:modelValue` | `[val: Record<string, any>]` |3233### Slots34| Slot | Type |35|------|------|36| `flattenItems` | `FlattenedItem<Record<string, any>>[]` |37| `modelValue` | `Record<string, any> \| Record<string, any>[]` |38| `expanded` | `string[]` |3940## TreeItem4142### Props43| Prop | Type | Default |44|------|------|---------|45| `as` | `AsTag \| Component` | `"li"` |46| `asChild` | `boolean` | - |47| `level`* | `number` | - |48| `value`* | `Record<string, any>` | - |4950### Emits51| Event | Payload |52|-------|---------|53| `select` | `[event: SelectEvent<Record<string, any>>]` |54| `toggle` | `[event: ToggleEvent<Record<string, any>>]` |5556### Slots57| Slot | Type |58|------|------|59| `isExpanded` | `boolean` |60| `isSelected` | `boolean` |61| `isIndeterminate` | `boolean \| undefined` |62| `handleToggle` | `` |63| `handleSelect` | `` |6465## TreeVirtualizer6667### Props68| Prop | Type | Default |69|------|------|---------|70| `estimateSize` | `number` | - |71| `textContent` | `((item: Record<string, any>) => string)` | - |7273### Slots74| Slot | Type |75|------|------|76| `item` | `FlattenedItem<Record<string, any>>` |77| `virtualizer` | `Virtualizer<Element \| Window, Element>` |78| `virtualItem` | `VirtualItem<Element>` |79