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/context-menu.md
1# Context Menu23Right-click context menu45**Parts:** `ContextMenuRoot`, `ContextMenuTrigger`, `ContextMenuPortal`, `ContextMenuContent`, `ContextMenuItem`, `ContextMenuCheckboxItem`, `ContextMenuRadioGroup`, `ContextMenuRadioItem`, `ContextMenuItemIndicator`, `ContextMenuLabel`, `ContextMenuGroup`, `ContextMenuSeparator`, `ContextMenuSub`, `ContextMenuSubTrigger`, `ContextMenuSubContent`, `ContextMenuArrow`67## ContextMenuRoot89### Props10| Prop | Type | Default |11|------|------|---------|12| `dir` | `"ltr" \| "rtl"` | - |13| `modal` | `boolean` | `true` |1415### Emits16| Event | Payload |17|-------|---------|18| `update:open` | `[payload: boolean]` |1920## ContextMenuTrigger2122### Props23| Prop | Type | Default |24|------|------|---------|25| `as` | `AsTag \| Component` | `"span"` |26| `asChild` | `boolean` | - |27| `disabled` | `boolean` | `false` |2829## ContextMenuPortal3031### Props32| Prop | Type | Default |33|------|------|---------|34| `disabled` | `boolean` | - |35| `forceMount` | `boolean` | - |36| `to` | `string \| HTMLElement` | - |3738## ContextMenuContent3940### Props41| Prop | Type | Default |42|------|------|---------|43| `alignOffset` | `number` | `0` |44| `as` | `AsTag \| Component` | `"div"` |45| `asChild` | `boolean` | - |46| `avoidCollisions` | `boolean` | `true` |47| `collisionBoundary` | `Element \| (Element \| null)[] \| null` | `[]` |48| `collisionPadding` | `number \| Partial<Record<"top" \| "right" \| "bott...` | `0` |49| `forceMount` | `boolean` | - |50| `hideWhenDetached` | `boolean` | `false` |51| `loop` | `boolean` | - |52| `prioritizePosition` | `boolean` | - |53| `sticky` | `"partial" \| "always"` | `"partial"` |5455### Emits56| Event | Payload |57|-------|---------|58| `closeAutoFocus` | `[event: Event]` |59| `escapeKeyDown` | `[event: KeyboardEvent]` |60| `focusOutside` | `[event: FocusOutsideEvent]` |61| `interactOutside` | `[event: PointerDownOutsideEvent \| FocusOutsideE...` |62| `pointerDownOutside` | `[event: PointerDownOutsideEvent]` |6364## ContextMenuItem6566### Props67| Prop | Type | Default |68|------|------|---------|69| `as` | `AsTag \| Component` | `"div"` |70| `asChild` | `boolean` | - |71| `disabled` | `boolean` | - |72| `textValue` | `string` | - |7374### Emits75| Event | Payload |76|-------|---------|77| `select` | `[event: Event]` |7879## ContextMenuCheckboxItem8081### Props82| Prop | Type | Default |83|------|------|---------|84| `as` | `AsTag \| Component` | `"div"` |85| `asChild` | `boolean` | - |86| `checked` | `false \| true \| "indeterminate"` | - |87| `disabled` | `boolean` | - |88| `textValue` | `string` | - |8990### Emits91| Event | Payload |92|-------|---------|93| `select` | `[event: Event]` |94| `update:checked` | `[payload: boolean]` |9596## ContextMenuRadioGroup9798### Props99| Prop | Type | Default |100|------|------|---------|101| `as` | `AsTag \| Component` | `"div"` |102| `asChild` | `boolean` | - |103| `modelValue` | `string` | - |104105### Emits106| Event | Payload |107|-------|---------|108| `update:modelValue` | `[payload: string]` |109110## ContextMenuRadioItem111112### Props113| Prop | Type | Default |114|------|------|---------|115| `as` | `AsTag \| Component` | `"div"` |116| `asChild` | `boolean` | - |117| `disabled` | `boolean` | - |118| `textValue` | `string` | - |119| `value`* | `string` | - |120121### Emits122| Event | Payload |123|-------|---------|124| `select` | `[event: Event]` |125126## ContextMenuItemIndicator127128### Props129| Prop | Type | Default |130|------|------|---------|131| `as` | `AsTag \| Component` | `"div"` |132| `asChild` | `boolean` | - |133| `forceMount` | `boolean` | - |134135## ContextMenuLabel136137### Props138| Prop | Type | Default |139|------|------|---------|140| `as` | `AsTag \| Component` | `"div"` |141| `asChild` | `boolean` | - |142143## ContextMenuGroup144145### Props146| Prop | Type | Default |147|------|------|---------|148| `as` | `AsTag \| Component` | `"div"` |149| `asChild` | `boolean` | - |150151## ContextMenuSeparator152153### Props154| Prop | Type | Default |155|------|------|---------|156| `as` | `AsTag \| Component` | `"div"` |157| `asChild` | `boolean` | - |158159## ContextMenuSub160161### Props162| Prop | Type | Default |163|------|------|---------|164| `defaultOpen` | `boolean` | - |165| `open` | `boolean` | - |166167### Emits168| Event | Payload |169|-------|---------|170| `update:open` | `[payload: boolean]` |171172### Slots173| Slot | Type |174|------|------|175| `open` | `boolean` |176177## ContextMenuSubTrigger178179### Props180| Prop | Type | Default |181|------|------|---------|182| `as` | `AsTag \| Component` | `"div"` |183| `asChild` | `boolean` | - |184| `disabled` | `boolean` | - |185| `textValue` | `string` | - |186187## ContextMenuSubContent188189### Props190| Prop | Type | Default |191|------|------|---------|192| `alignOffset` | `number` | - |193| `arrowPadding` | `number` | - |194| `as` | `AsTag \| Component` | `"div"` |195| `asChild` | `boolean` | - |196| `avoidCollisions` | `boolean` | - |197| `collisionBoundary` | `Element \| (Element \| null)[] \| null` | - |198| `collisionPadding` | `number \| Partial<Record<"top" \| "right" \| "bott...` | - |199| `forceMount` | `boolean` | - |200| `hideWhenDetached` | `boolean` | - |201| `loop` | `boolean` | - |202| `prioritizePosition` | `boolean` | - |203| `sideOffset` | `number` | - |204| `sticky` | `"partial" \| "always"` | - |205| `updatePositionStrategy` | `"always" \| "optimized"` | - |206207### Emits208| Event | Payload |209|-------|---------|210| `closeAutoFocus` | `[event: Event]` |211| `entryFocus` | `[event: Event]` |212| `escapeKeyDown` | `[event: KeyboardEvent]` |213| `focusOutside` | `[event: FocusOutsideEvent]` |214| `interactOutside` | `[event: PointerDownOutsideEvent \| FocusOutsideE...` |215| `openAutoFocus` | `[event: Event]` |216| `pointerDownOutside` | `[event: PointerDownOutsideEvent]` |217218## ContextMenuArrow219220### Props221| Prop | Type | Default |222|------|------|---------|223| `as` | `AsTag \| Component` | `"svg"` |224| `asChild` | `boolean` | - |225| `height` | `number` | `5` |226| `width` | `number` | `10` |227