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

Menu

Dropdown 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/dropdown-menu

Import the shared styles once in your application.

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

API Reference

DropdownMenu

v-model:open?
boolean
Defaultundefined
defaultOpen?
boolean
Default—
items?
readonly MenuItemSpec[]
Defaultundefined
label?
string

Accessible name of the data-driven menu, and the trigger text unless the slot gives one.

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

DropdownMenuTrigger

#default?
slot

A single focusable element, usually a button.

Default—
disabled?
boolean
Defaultfalse

DropdownMenuContent

class?
string
Default—
side?
"top" | "bottom"

Preferred side. Flips when the viewport has no room. Default "bottom".

Defaultbottom
align?
Align

Default "start".

Defaultstart
sideOffset?
number

Gap between trigger and menu in px. Default 6.

Default6

DropdownMenuItem

@select?
() => void
Default—
disabled?
boolean
Default—
closeOnSelect?
boolean

Close the whole menu after selecting. Default true.

Defaulttrue
tone?
"default" | "destructive"
Defaultdefault
inset?
boolean

Indent to line up with checkbox and radio rows.

Default—
textValue?
string

Text matched by typeahead when the label is not plain text.

Default—
class?
string
Default—

DropdownMenuCheckboxItem

v-model:checked
boolean
Default—
class?
string
Default—
disabled?
boolean
Default—
closeOnSelect?
boolean

Close the whole menu after selecting. Default true.

Defaultfalse
textValue?
string

Text matched by typeahead when the label is not plain text.

Default—
@checked-change?
(checked: boolean) => void
Default—

DropdownMenuRadioGroup

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

DropdownMenuRadioItem

value
string
Default—
class?
string
Default—
disabled?
boolean
Default—
closeOnSelect?
boolean

Close the whole menu after selecting. Default true.

Defaultfalse
textValue?
string

Text matched by typeahead when the label is not plain text.

Default—
@select?
() => void
Default—

DropdownMenuSubTrigger

disabled?
boolean
Default—
inset?
boolean
Default—
textValue?
string
Default—
class?
string
Default—

DropdownMenuSubContent

class?
string
Default—
sideOffset?
number

Gap between the menu's edge and the submenu in px. Default 6.

Default6

DropdownMenuLabel

inset?
boolean
Default—
class?
string
Default—

DropdownMenuSeparator

class?
string
Default—

DropdownMenuShortcut

class?
string
Default—

Updated