Overlays
DropdownMenu
A trigger-activated menu of grouped, possibly nested actions, with optional avatars/badges.
<UiDropdownMenu />Items
items is a flat array is one group. Nest arrays instead and each becomes a group, separated by a divider.
Disabled
disabled is the trigger stops opening the menu at all.
Default open
defaultOpen starts the menu open when it manages its own state. It's a narrow tool: a menu that opens on mount covers whatever is beneath it before anybody asked for it.
Open
Pass it — usually as v-model:open — when something outside the menu has to open or close it.
Content
content sets where the panel sits relative to the trigger — side, alignment and offset.
Match trigger width
matchTriggerWidth stretches the panel to the trigger's width — what a select-like trigger wants, so the button and the list read as one control rather than two.
matchTriggerWidth is what makes it work as a select-like dropdown; without it the menu sizes to its own content, not the trigger.
Item color
An item can carry its own color, which is how a destructive action reads as one.
Checkbox items
type: 'checkbox' turns an item into a toggle that keeps the menu open.
API Reference
Generated from the component's source — props, slots and emits as the component actually declares them.
Props
DropdownMenuItem[] | DropdownMenuItem[][]booleanDropdownMenuContentProps{ align: 'start', side: 'bottom', sideOffset: 8 }booleanfalseSlots
defaultEmits
update:open[value: boolean]Types
interface DropdownMenuItem {
label?: string;
description?: string;
icon?: string;
status?: "online" | "offline" | "away" | "dnd" | "busy";
avatar?: {
src?: string;
alt?: string;
firstName?: string;
lastName?: string;
status?: "online" | "offline" | "away" | "dnd" | "busy";
shape?: "circle" | "square";
};
badge?: {
text?: number | string;
color?: "primary" | "secondary" | "success" | "warning" | "error" | "info" | "pending" | "neutral";
};
kbds?: Array<string | { value?: string }>;
type?: "link" | "label" | "separator" | "checkbox";
color?: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral";
checked?: boolean;
disabled?: boolean;
onSelect?: (e: Event) => void;
onUpdateChecked?: (checked: boolean) => void;
children?: DropdownMenuItem[] | DropdownMenuItem[][];
class?: any;
to?: string;
target?: string;
}interface DropdownMenuContentProps {
align?: "start" | "center" | "end";
side?: "bottom" | "top";
sideOffset?: number;
}