Dropdown
An action menu — from data in one line, or composed with checkbox items, radio groups and submenus.
Loading documentation…
Dropdown is a menu of actions anchored to a trigger. Rows are 20px-guttered
so icons, check marks and radio dots all line up, whatever a given menu mixes.
It does not lock the page. modal defaults to false, which is not Base
UI's default: a menu is a list of things you might not do, and freezing the
application behind one feels broken — and if the unlock ever misses, it stays
broken.
items builds the whole menu — rows, separators and titled sections — from an
array. The string "separator" is a rule; an entry with items is a section.
A menu is also where small, immediate settings live. Radio items draw their own dot on the same 20px gutter the checkbox items use, so a mixed menu stays aligned.
Whether the open menu locks the page. It defaults to false, unlike Base
UI.
Controlled state. Pair it with onOpenChange.
Open on first render.
Fires on open and close.
Shorthand. An entry is a row (label, icon, shortcut, destructive,
disabled, onClick), the string "separator", or a section (label plus
nested items).
Preferred placement. It flips when there is no room.
Alignment against the trigger. It defaults to start.
Gap between the trigger and the menu, in pixels. It defaults to 4.
Escape hatch for anything else the positioner supports.
The leading glyph.
A right-aligned hint, usually a Kbd.
Red styling for an irreversible action.
Dims the row and ignores interaction.
Runs when the row is chosen.
Anything that opens the menu. Pass render={<Button />} to use a button.
A togglable row with a check mark in the gutter.
A single choice. The dot is drawn by heyo-ui, on the checkbox gutter.
A titled section, its heading, and a rule.
A nested menu. SubContent takes the same props as Content.