overlay · @awesome-ds/react
DropdownMenu
Action menu with menuitem roles.
State matrix
open
closed
Anatomy
- menu trigger
- menu popup
- menu items
Keyboard contract
Arrow keys move, Home/End jump, Enter selects, and Escape closes to the trigger.
Screen-reader contract
Trigger expanded state, menu role, and each menuitem are exposed.
Content rules
- Use action verbs.
- Separate destructive actions visually and semantically.
Public API
| Prop | Type | required | Description |
|---|---|---|---|
label | string | required | Menu trigger name |
items | DropdownMenuItem[] | required | Available actions |
Adaptation contracts
- RTL
- Use logical action alignment and preserve the safe primary/cancel reading order.
- High contrast
- Separate overlay, surface, focus, and actions with system-color boundaries.
- Reduced motion
- Open and close instantly or with opacity only; focus timing remains deterministic.
Verification IDs
Live
Live
Copyable example
import { DropdownMenu } from "@awesome-ds/react";
<DropdownMenu label="Actions" items={[{id:'a',label:'Edit'}]} />