Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Animated Context Menu

Preview

Install

Add it with your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/context-menu

Import the shared styles once in your application.

TSUsage
import ContextMenu from '@/components/beui/controls/menu/ContextMenu.vue'
import '@/components/beui/styles.css'

API Reference

ContextMenu

v-model:open?
boolean
Defaultundefined
defaultOpen?
boolean
Default—
labels?
Partial<ContextMenuMessages>

Override any built-in string.

Defaultundefined
class?
string
Default—
items?
readonly MenuItemSpec[]
Defaultundefined
label?
string

Accessible name of the menu. Overrides `labels.label`.

Defaultundefined
@select?
(item: MenuItemSpec) => void
Default—

ContextMenuTrigger

disabled?
boolean

Stop the trigger from opening the menu.

Default—
class?
string
Default—
#default?
slot

The single element that opens the menu.

Default—

ContextMenuContent

class?
string
Default—
ariaLabel?
string

Accessible name of the menu. Overrides the root's `label`.

Default—

ContextMenuItem

@select?
() => void
Default—
disabled?
boolean
Default—
closeOnSelect?
boolean
Defaulttrue
tone?
"default" | "destructive"
Defaultdefault
inset?
boolean
Default—
class?
string
Default—
textValue?
string
Default—
role?
"menuitem" | "menuitemcheckbox" | "menuitemradio"
Defaultmenuitem
ariaChecked?
boolean
Defaultundefined

ContextMenuCheckboxItem

v-model:checked
boolean
Default—
class?
string
Default—
inset?
boolean
Default—
disabled?
boolean
Default—
closeOnSelect?
boolean
Defaulttrue
tone?
"default" | "destructive"
Defaultdefault
textValue?
string
Default—
@checked-change?
(checked: boolean) => void
Default—

ContextMenuRadioGroup

v-model:value
string
Default—
class?
string
Default—
@value-change?
(value: string) => void
Default—

ContextMenuRadioItem

value
string
Default—
class?
string
Default—
inset?
boolean
Default—
disabled?
boolean
Default—
closeOnSelect?
boolean
Defaulttrue
tone?
"default" | "destructive"
Defaultdefault
textValue?
string
Default—
@select?
() => void
Default—

ContextMenuLabel

inset?
boolean
Default—
class?
string
Default—

ContextMenuSeparator

class?
string
Default—

ContextMenuShortcut

class?
string
Default—

Updated