Overlays/Dropdown Menu
Dropdown Menu
A click-triggered menu of actions, positioned relative to a trigger element. Dismisses on outside click or Escape key.
import { DropdownMenu } from "@animui/ui"Basic
Alignment
Disabled items
Props
| Prop | Type | Default | Description |
|---|---|---|---|
trigger | React.ReactNode | — | The element that opens the menu on click. |
items | DropdownMenuItem[] | — | The list of menu items to render. |
align | "start" | "end" | "start" | Aligns the menu panel to the left or right edge of the trigger. |
className | string | — | Additional classes for the menu panel. |
Accessibility
- ✓Trigger exposes
aria-haspopupandaria-expanded. - ✓Menu items are rendered with
role="menuitem"inside arole="menu"container. - ✓Closes on outside click or the
Escapekey.