Skip to content
TrademarkTrademark
Docs
Components

DropdownWrapper

Updated: October 11, 2026
View on GitHub

DropdownWrapper is a container component that handles the positioning and state management of dropdown menus. It provides a flexible way to create custom dropdown interfaces with various trigger elements and dropdown contents. It supports keyboard navigation when used with Option components.

Basic usage

A simple dropdown with a button trigger and custom content.

Placement

Control the placement of the dropdown relative to its trigger element.

Custom

Control the dimensions of the dropdown menu.

Where it opens

A panel opens on the option marked aria-selected="true", scrolled into view inside the panel, the way a native select opens on the value it is already showing. Option sets that attribute from its selected prop, so a list built from Option needs nothing further. With no selection the panel opens on its first enabled option; a selected option that is disabled is skipped.

A panel that leads with something other than its list — a searchable Select and its query field — opens on that instead.

Button triggers

A Button or IconButton passed as the trigger renders a real <button type="button"> with aria-haspopup and aria-expanded, so the dropdown opens from the keyboard as well as the mouse. There is no need to add type="button" or an empty onClick to make it one. A disabled trigger does not open the dropdown.

API reference

Type
Default
fillWidth
Match the trigger's width.
booleanfalse
minWidth
Lower bound on the dropdown's width, in rem.
number—
maxWidth
Upper bound on the dropdown's width, in rem.
number—
minHeight
Lower bound on the dropdown's height, in rem.
number—
placement
Which side of the trigger it opens on, and how it aligns.
toprightbottomlefttop-starttop-endright-startright-endbottom-startbottom-endleft-startleft-end
bottom-start
triggerrequired
The element that opens the dropdown.
ReactNode—
dropdownrequired
What opens. Usually a Column of Options.
ReactNode—
selectedOption
Value of the Option to mark as current.
string—
style
React.CSSProperties—
className
string—
onSelect
Called with the value of the Option that was picked.
(value: string) => void—
closeAfterClick
Close on selection. Turn it off for a multi-select.
booleantrue
handleArrowNavigation
Move through options with the arrow keys.
booleantrue
open
Controlled open state. Leave it out to let the component manage its own.
boolean—
onOpenChange
Called whenever it opens or closes, controlled or not.
(open: boolean) => void—
nested
Marks a dropdown opened from inside another one.
booleanfalse
navigationLayout
Whether arrow keys walk a row, a column or a grid.
gridrowcolumn
—
columns
Grid width, for a grid navigation layout.
numberstring
8
optionsCount
How many options there are, when the component cannot count them itself.
number—
dropdownId
Id for the dropdown element, to reference from a label.
string—
disableTriggerClick
Stop the trigger opening it, when something else does.
booleanfalse
onFocusCapture
React.FocusEventHandler<HTMLDivElement>—
onBlurCapture
React.FocusEventHandler<HTMLDivElement>—
Edit this page on GitHub