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/dropdown-menu.md
1# Dropdown Menu23Dropdown action menu45**Parts:** `DropdownMenuRoot`, `DropdownMenuTrigger`, `DropdownMenuPortal`, `DropdownMenuContent`, `DropdownMenuItem`, `DropdownMenuCheckboxItem`, `DropdownMenuRadioGroup`, `DropdownMenuRadioItem`, `DropdownMenuItemIndicator`, `DropdownMenuLabel`, `DropdownMenuGroup`, `DropdownMenuSeparator`, `DropdownMenuSub`, `DropdownMenuSubTrigger`, `DropdownMenuSubContent`, `DropdownMenuArrow`67## DropdownMenuRoot89### Props10| Prop | Type | Default |11|------|------|---------|12| `defaultOpen` | `boolean` | - |13| `dir` | `"ltr" \| "rtl"` | - |14| `modal` | `boolean` | `true` |15| `open` | `boolean` | - |1617### Emits18| Event | Payload |19|-------|---------|20| `update:open` | `[payload: boolean]` |2122### Slots23| Slot | Type |24|------|------|25| `open` | `boolean` |2627## DropdownMenuTrigger2829### Props30| Prop | Type | Default |31|------|------|---------|32| `as` | `AsTag \| Component` | `"button"` |33| `asChild` | `boolean` | - |34| `disabled` | `boolean` | - |3536## DropdownMenuPortal3738### Props39| Prop | Type | Default |40|------|------|---------|41| `disabled` | `boolean` | - |42| `forceMount` | `boolean` | - |43| `to` | `string \| HTMLElement` | - |4445## DropdownMenuContent4647### Props48| Prop | Type | Default |49|------|------|---------|50| `align` | `"start" \| "center" \| "end"` | - |51| `alignOffset` | `number` | - |52| `arrowPadding` | `number` | - |53| `as` | `AsTag \| Component` | `"div"` |54| `asChild` | `boolean` | - |55| `avoidCollisions` | `boolean` | - |56| `collisionBoundary` | `Element \| (Element \| null)[] \| null` | - |57| `collisionPadding` | `number \| Partial<Record<"top" \| "right" \| "bott...` | - |58| `forceMount` | `boolean` | - |59| `hideWhenDetached` | `boolean` | - |60| `loop` | `boolean` | - |61| `prioritizePosition` | `boolean` | - |62| `side` | `"top" \| "right" \| "bottom" \| "left"` | - |63| `sideOffset` | `number` | - |64| `sticky` | `"partial" \| "always"` | - |65| `updatePositionStrategy` | `"always" \| "optimized"` | - |6667### Emits68| Event | Payload |69|-------|---------|70| `closeAutoFocus` | `[event: Event]` |71| `escapeKeyDown` | `[event: KeyboardEvent]` |72| `focusOutside` | `[event: FocusOutsideEvent]` |73| `interactOutside` | `[event: PointerDownOutsideEvent \| FocusOutsideE...` |74| `pointerDownOutside` | `[event: PointerDownOutsideEvent]` |7576## DropdownMenuItem7778### Props79| Prop | Type | Default |80|------|------|---------|81| `as` | `AsTag \| Component` | `"div"` |82| `asChild` | `boolean` | - |83| `disabled` | `boolean` | - |84| `textValue` | `string` | - |8586### Emits87| Event | Payload |88|-------|---------|89| `select` | `[event: Event]` |9091## DropdownMenuCheckboxItem9293### Props94| Prop | Type | Default |95|------|------|---------|96| `as` | `AsTag \| Component` | `"div"` |97| `asChild` | `boolean` | - |98| `checked` | `false \| true \| "indeterminate"` | - |99| `disabled` | `boolean` | - |100| `textValue` | `string` | - |101102### Emits103| Event | Payload |104|-------|---------|105| `select` | `[event: Event]` |106| `update:checked` | `[payload: boolean]` |107108## DropdownMenuRadioGroup109110### Props111| Prop | Type | Default |112|------|------|---------|113| `as` | `AsTag \| Component` | `"div"` |114| `asChild` | `boolean` | - |115| `modelValue` | `string` | - |116117### Emits118| Event | Payload |119|-------|---------|120| `update:modelValue` | `[payload: string]` |121122## DropdownMenuRadioItem123124### Props125| Prop | Type | Default |126|------|------|---------|127| `as` | `AsTag \| Component` | `"div"` |128| `asChild` | `boolean` | - |129| `disabled` | `boolean` | - |130| `textValue` | `string` | - |131| `value`* | `string` | - |132133### Emits134| Event | Payload |135|-------|---------|136| `select` | `[event: Event]` |137138## DropdownMenuItemIndicator139140### Props141| Prop | Type | Default |142|------|------|---------|143| `as` | `AsTag \| Component` | `"div"` |144| `asChild` | `boolean` | - |145| `forceMount` | `boolean` | - |146147## DropdownMenuLabel148149### Props150| Prop | Type | Default |151|------|------|---------|152| `as` | `AsTag \| Component` | `"div"` |153| `asChild` | `boolean` | - |154155## DropdownMenuGroup156157### Props158| Prop | Type | Default |159|------|------|---------|160| `as` | `AsTag \| Component` | `"div"` |161| `asChild` | `boolean` | - |162163## DropdownMenuSeparator164165### Props166| Prop | Type | Default |167|------|------|---------|168| `as` | `AsTag \| Component` | `"div"` |169| `asChild` | `boolean` | - |170171## DropdownMenuSub172173### Props174| Prop | Type | Default |175|------|------|---------|176| `defaultOpen` | `boolean` | - |177| `open` | `boolean` | - |178179### Emits180| Event | Payload |181|-------|---------|182| `update:open` | `[payload: boolean]` |183184### Slots185| Slot | Type |186|------|------|187| `open` | `boolean` |188189## DropdownMenuSubTrigger190191### Props192| Prop | Type | Default |193|------|------|---------|194| `as` | `AsTag \| Component` | `"div"` |195| `asChild` | `boolean` | - |196| `disabled` | `boolean` | - |197| `textValue` | `string` | - |198199## DropdownMenuSubContent200201### Props202| Prop | Type | Default |203|------|------|---------|204| `alignOffset` | `number` | - |205| `arrowPadding` | `number` | - |206| `as` | `AsTag \| Component` | `"div"` |207| `asChild` | `boolean` | - |208| `avoidCollisions` | `boolean` | - |209| `collisionBoundary` | `Element \| (Element \| null)[] \| null` | - |210| `collisionPadding` | `number \| Partial<Record<"top" \| "right" \| "bott...` | - |211| `forceMount` | `boolean` | - |212| `hideWhenDetached` | `boolean` | - |213| `loop` | `boolean` | - |214| `prioritizePosition` | `boolean` | - |215| `sideOffset` | `number` | - |216| `sticky` | `"partial" \| "always"` | - |217| `updatePositionStrategy` | `"always" \| "optimized"` | - |218219### Emits220| Event | Payload |221|-------|---------|222| `closeAutoFocus` | `[event: Event]` |223| `entryFocus` | `[event: Event]` |224| `escapeKeyDown` | `[event: KeyboardEvent]` |225| `focusOutside` | `[event: FocusOutsideEvent]` |226| `interactOutside` | `[event: PointerDownOutsideEvent \| FocusOutsideE...` |227| `openAutoFocus` | `[event: Event]` |228| `pointerDownOutside` | `[event: PointerDownOutsideEvent]` |229230## DropdownMenuArrow231232### Props233| Prop | Type | Default |234|------|------|---------|235| `as` | `AsTag \| Component` | `"svg"` |236| `asChild` | `boolean` | - |237| `height` | `number` | `5` |238| `width` | `number` | `10` |239