DropdownMenu
A menu of actions opened from a button.
Staticimport { DropdownMenu } from 'umbra-ui'
Props
DropdownMenu
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | `DropdownMenuTrigger` and `DropdownMenuContent`. |
defaultOpen | boolean | false | Initial open state when uncontrolled. |
modal | boolean | true | Block interaction outside the menu while open. |
onOpenChange | ((open: boolean) => void) | — | Called when the menu opens or closes. |
open | boolean | — | Controlled open state. |
DropdownMenuItem
| Prop | Type | Default | Description |
|---|---|---|---|
shortcut | ReactNode | — | Keyboard shortcut hint shown at the end of the row (visual only). |
tone | "neutral" | "danger" | neutral | Colour intent; `danger` for destructive actions. |
Usage notes
Built on Radix DropdownMenu.
Accessibility
menu/menuitem/menuitemcheckbox/menuitemradioroles.- Enter, Space or ↓ opens; ↑/↓ move; typing jumps; Escape closes and returns focus to the trigger.
shortcutis a visual hint only: bind the actual key yourself.
Import
import { DropdownMenu, DropdownMenuItem } from 'umbra-ui';
import 'umbra-ui/styles.css'; // once, at the root of your app