2.0 alpha
These docs describe 2.0. Install it with @once-ui-system/core@alpha.
On 1.8.x? Read the 1.x docs
TrademarkTrademarkDocs
Ctrl k
Search docs...
Components

DropdownWrapper

Updated: July 27, 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. A simple dropdown with a button trigger and custom content. Control the placement of the dropdown relative to its trigger element. Control the dimensions of the dropdown menu.
Prop
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
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club