DropdownMenu | DropdownMenuItem
DropdownMenuItem#
Description#
- Represents an interactive option within the dropdown menu.
- Supports regular items, checkboxes, and radios, icons, descriptions, keyboard shortcuts, and danger variant.
- On selection, closes the menu and returns focus.
Props#
disabled(boolean) — Disables the item. Default:false.checked(boolean | 'mixed' | null) — Item check state.nullis a regular item. Default:null.toggle('checkbox' | 'radio') — Check type whencheckedis notnull. Default:'checkbox'.inset(number) — Number of icon columns (28 px) to offset the text. Default:0.icon(string) — Theme icon name shown before the text.iconType('icon' | 'symbol') — Icon rendering type. Default:'symbol'.shortcut(readonly string[]) — Keyboard shortcut keys. Default:[].danger(boolean) — Applies danger styling to the item. Default:false.
Emits#
select— Emitted when the item is chosen (click or keyboard).click— Emitted with the native event when the item is chosen.update:checked— Emitted with the new boolean value when a checkable item is chosen.
Usage#
| |
Notes#
- A disabled item is still keyboard accessible and appears in the DOM with
aria-disabled. checked="mixed"shows a dash (indeterminate checkbox) and only works withtoggle="checkbox".dangerapplies an error-tinted hover/active overlay but the text does not turn red due to contrast.