Toggle Sidebar B
AppearanceLight & dark mode D

Dropdown Menu

Click-triggered menu attached to a button. Supports items, separators, labels, shortcuts, checkbox and radio items, and nested submenus.

Demo

A dropdown menu with icons, shortcuts and sub menu items.

Replay preview

Basic

A basic dropdown menu with labels and separators.

Replay preview

Shortcuts

Add DropdownMenuShortcut to show keyboard hints.

Replay preview

Icons

Combine icons with labels for quick scanning.

Replay preview

Checkboxes

Use DropdownMenuCheckboxItem for toggles.

Replay preview

Checkboxes Icons

Add icons to checkbox items.

Replay preview

Radio Group

Use DropdownMenuRadioGroup for exclusive choices.

Replay preview

Radio Icons

Show radio options with icons.

Replay preview

Destructive

Use variant="destructive" for irreversible actions.

Replay preview

Avatar

An account switcher dropdown triggered by an avatar.

Replay preview

Complex

A richer example combining groups, icons, and submenus.

Replay preview

RTL

Pass dir="rtl" to flip the menu's alignment and submenu direction.

Replay preview

API Reference

DropdownMenu

PropTypeDefaultDescription
openbooleanOpen state. Supports v-model:open.
modalbooleantrueTrap focus and dim background when open.
EventDescription
update:openFires when the menu opens or closes. Enables v-model:open.

DropdownMenuTrigger

PropTypeDefaultDescription
asChildbooleanfalseMerge props onto the child element instead of a button.

DropdownMenuContent

PropTypeDefaultDescription
side"top" | "right" | "bottom" | "left""bottom"Anchor side.
align"start" | "center" | "end""center"Alignment along the side.
sideOffsetnumber4Gap from the trigger in px.
EventDescription
close-auto-focusFires when focus returns to the trigger after closing.

DropdownMenuItem

PropTypeDefaultDescription
variant"default" | "destructive""default"destructive tints the item red for delete-style actions.
disabledbooleanfalseBlock selection.
insetbooleanfalseExtra left padding to align with icon items.
EventDescription
selectFires when the item is chosen.

DropdownMenuCheckboxItem / DropdownMenuRadioItem

PropTypeDefaultDescription
modelValueboolean | stringItem state. Supports v-model.
EventDescription
update:modelValueFires when the checkbox toggles or the radio value changes.

DropdownMenuSub / DropdownMenuSubTrigger / DropdownMenuSubContent

PropTypeDefaultDescription
insetbooleanfalse(SubTrigger) Align with icon items. Submenu opens on hover or right-arrow.

DropdownMenuLabel

PropTypeDefaultDescription
insetbooleanfalseAlign the section label with inset items.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
SpaceOpens the menu from the trigger, or activates the focused item.
EnterOpens the menu from the trigger, or activates the focused item.
Moves focus to the previous item.
Moves focus to the next item.
Opens a submenu when focus is on a submenu trigger.
Closes a submenu and returns focus to its trigger.
HomeMoves focus to the first item.
EndMoves focus to the last item.
EscCloses the menu and returns focus to the trigger.
ATyping characters jumps to the matching item (typeahead).
  • Uses a roving tabindex: only one item is tabbable and arrows move focus between items.
  • Menu items use role=menuitem within a role=menu container.