DropdownMenu | DropdownMenuContent
DropdownMenuContent#
Description#
- Renders the dropdown menu body with
role="menu", automatic positioning, and built-in keyboard navigation. - Teleports to
bodyto avoidoverflowclipping and positions itself relative to the trigger.
Props#
side('top' | 'bottom' | 'left' | 'right') — Preferred side relative to the trigger. Default:'bottom'.align('start' | 'center' | 'end') — Alignment of the menu along the chosen side. Default:'start'.sideOffset(number) — Distance in pixels between the trigger and the menu. Default:4.
Usage#
| |
Notes#
- If the preferred side has no room, the menu flips automatically.
- Keyboard navigates items with arrows, Home/End, Escape, and Tab (closes the menu).
- Closing via outside click returns focus to the trigger by default.