Form Inputs

Select

Displays a list of options for the user to pick from—triggered by a button.

Displays a list of options for the user to pick from—triggered by a button.

Selected item alignment#

By default, the menu opens below the trigger like a dropdown. Set alignItemWithTrigger to align the selected option with the trigger value instead.

With label#

Loading#

Custom display#

Scrollable#

Fullscreen mode#

Component props#

NameTypeDescription
valuestring | numberControlled selected value
defaultValuestring | numberDefault selected value
labelstringLabel text displayed above the select
placeholderstringPlaceholder text when no selection
isLoadingbooleanShows loading indicator
isDisabledbooleanDisables the select (disabled is also accepted)
size'sm' | 'md'Trigger size. Emits data-size on the trigger (default: md)
isFullscreenbooleanOpens options in fullscreen mode
allowSearchbooleanEnables search within options
searchValuestringControlled search field value
searchDelaynumberDebounce delay for search
maxHeightstring | numberMax height of the dropdown list. When set, the list is wrapped in a ScrollArea; otherwise the popup scrolls itself and shows scroll arrows
showIconbooleanShow chevron icon on trigger button (default: true)
alignItemWithTriggerbooleanAligns the selected option with the trigger instead of opening below it (default: false)
onChange(value: any) => voidCalled when selection changes
onValueChange(value, details) => voidBase UI change handler, called before onChange
onSearch(value: string) => voidCalled when search value changes
renderValueReactNode | FunctionCustom render for selected value
triggerPropsSelect.Trigger.PropsProps passed to the trigger element (buttonProps is a deprecated alias)
listPropsListPropsProps passed to the list component
popoverPropsPopoverPropsProps passed to the popover

Anatomy#

The rendered parts expose data-slot attributes for styling: select, select-trigger, select-value, select-icon, select-positioner, select-content, select-empty, select-scroll-up-button, select-scroll-down-button, and list / list-item from List.

The selected label is resolved by Base UI from the items collection—when items is not supplied it is derived from the <ListItem> children automatically.