Skip to main content

Select

Choose from a dropdown list of options, built on Base UI.

View as Markdown

Installation

Component API

PropTypeDefaultDescription
optionsSelectOption[]-
labelstring-Text above the trigger.
Text above the trigger.
descriptionstring-A line under the control, for context on what the choice means.
A line under the control, for context on what the choice means.
placeholderstringSelect…Shown on the trigger before anything is selected.
Shown on the trigger before anything is selected.
defaultValuestring-
valuestring-Controlled selection.
Controlled selection.
onValueChange(value: string | null) => void-
iconReactNode-
iconPositionleading | trailingleading
compactbooleanfalseOn phones the trigger shows only icon and the chevron.
On phones the trigger shows only icon and the chevron.
ariaLabelstring-The accessible name, for a select with no visible label.
The accessible name, for a select with no visible label.
sizesm | md | lgmd
shapenone | rounded | pillrounded
disabledbooleanfalseBlocks interaction and dims the whole control, label included.
Blocks interaction and dims the whole control, label included.
requiredbooleanfalseAppends a red asterisk to the label & sets the trigger's native required attribute.
Appends a red asterisk to the label & sets the trigger's native required attribute.
animatedbooleantrue
classNamestring-
focusboolean | stringtrue
containerHTMLElement | null-