Select

Pick one option from a styled popup.

<Select.Root>
	<Select.Trigger className="w-56">
		<Select.Value placeholder="Select a specialty" />
	</Select.Trigger>
	<Select.Content>
		<Select.Group>
			<Select.Label>Creative</Select.Label>
			<Select.Item value="designer">Designer</Select.Item>
		</Select.Group>
	</Select.Content>
</Select.Root>

To show a label rather than the raw value on a controlled select, pass items as a value-to-label record — otherwise the trigger shows brand-refresh instead of "Brand refresh".

More than a dozen options wants Combobox; a phone-first form wants ResponsiveSelect.

API

Select.Root

PropTypeDefault
actionsRefRefObject<SelectRootActions | null>A ref to imperative actions.
autoCompletestringProvides a hint to the browser for autofill.
childrenReactNode
defaultOpenbooleanWhether the select popup is initially open. To render a controlled select popup, use the open prop instead.
defaultValueSelectValueType<Value, Multiple> | nullThe uncontrolled value of the select when it's initially rendered. To render a controlled select, use the value prop instead.
disabledbooleanWhether the component should ignore user interaction.
formstringIdentifies the form that owns the hidden input. Useful when the select is rendered outside the form.
highlightItemOnHoverbooleanWhether moving the pointer over items should highlight them. Disabling this prop allows CSS :hover to be differentiated from the :focus (data-highlighted) state.
idstringThe id of the Select.
inputRefRef<HTMLInputElement>A ref to access the hidden input element.
isItemEqualToValue((itemValue: Value, value: Value) => boolean)Custom comparison logic used to determine if a select item value matches the current selected value. Useful when item values are objects without matching referentially. Defaults to Object.is comparison.
itemsreadonly Group<any>[] | readonly { label: ReactNode; value: any; }[] | Record<string, ReactNode>Data structure of the items rendered in the select popup. When specified, <Select.Value> renders the label of the selected item instead of the raw value.
itemToStringLabel((itemValue: Value) => string)When the item values are objects (<Select.Item value={object}>), this function converts the object value to a string representation for display in the trigger. If the shape of the object is { value, label }, the label will be used automatically without needing to specify this prop.
itemToStringValue((itemValue: Value) => string)When the item values are objects (<Select.Item value={object}>), this function converts the object value to a string representation for form submission. If the shape of the object is { value, label }, the value will be used automatically without needing to specify this prop.
modalbooleanDetermines if the select enters a modal state when open.
multipleMultipleWhether multiple items can be selected.
namestringIdentifies the field when a form is submitted.
onOpenChange((open: boolean, eventDetails: SelectRootChangeEventDetails) => void)Event handler called when the select popup is opened or closed.
onOpenChangeComplete((open: boolean) => void)Event handler called after any animations complete when the select popup is opened or closed.
onValueChange((value: SelectValueType<Value, Multiple> | (Multiple extends true ? never : null), eventDetails: SelectRootChangeEventDetails) => void)Event handler called when the value of the select changes.
openbooleanWhether the select popup is currently open.
readOnlybooleanWhether the user should be unable to choose a different option from the select popup.
requiredbooleanWhether the user must choose a value before submitting a form.
valueSelectValueType<Value, Multiple> | nullThe value of the select. Use when controlled.

Plus the DOM props of the element it renders. Source: select/components/select-root.tsx.

Select.Content

PropTypeDefault
alignAlign"center"How to align the popup relative to the specified side.
alignItemWithTriggerbooleantrueWhether the positioner overlaps the trigger so the selected item's text is aligned with the trigger's value text. This only applies to mouse input and is automatically disabled if there is not enough space.
alignOffsetnumber | OffsetFunction0Additional offset along the alignment axis in pixels. Also accepts a function that returns the offset to read the dimensions of the anchor and positioner elements, along with its side and alignment. The function takes a data object parameter with the following properties:
childrenReactNode
classNamestring | ((state: SelectPopupState) => string | undefined)CSS class applied to the element, or a function that returns a class based on the component's state.
collisionPaddingPaddingAdditional space to maintain from the edge of the collision boundary.
finalFocusboolean | RefObject<HTMLElement | null> | ((closeType: InteractionType) => void | boolean | HTMLElement | null)Determines the element to focus when the select popup is closed.
renderComponentRenderFn<HTMLProps, SelectPopupState> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
sideSide"bottom"Which side of the anchor element to align the popup against. May automatically change to avoid collisions.
sideOffsetnumber | OffsetFunction4Distance between the anchor and the popup in pixels. Also accepts a function that returns the distance to read the dimensions of the anchor and positioner elements, along with its side and alignment. The function takes a data object parameter with the following properties:
styleCSSProperties | ((state: SelectPopupState) => CSSProperties | undefined)Style applied to the element, or a function that returns a style object based on the component's state.

Plus the DOM props of the element it renders. Source: select/components/select-content.tsx.

Select.Group

PropTypeDefault
classNamestring | ((state: SelectGroupState) => string | undefined)CSS class applied to the element, or a function that returns a class based on the component's state.
renderComponentRenderFn<HTMLProps, SelectGroupState> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleCSSProperties | ((state: SelectGroupState) => CSSProperties | undefined)Style applied to the element, or a function that returns a style object based on the component's state.

Plus the DOM props of the element it renders. Source: select/components/select-group.tsx.

Select.Item

PropTypeDefault
childrenReactNode
classNamestring | ((state: SelectItemState) => string | undefined)CSS class applied to the element, or a function that returns a class based on the component's state.
disabledbooleanWhether the component should ignore user interaction.
labelstringSpecifies the text label to use when the item is matched during keyboard text navigation. Defaults to the item text content if not provided.
nativeButtonbooleanWhether the component renders a native <button> element when replacing it via the render prop. Set to true if the rendered element is a native button.
renderComponentRenderFn<HTMLProps, SelectItemState> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleCSSProperties | ((state: SelectItemState) => CSSProperties | undefined)Style applied to the element, or a function that returns a style object based on the component's state.
valueanyA unique value that identifies this select item.

Plus the DOM props of the element it renders. Source: select/components/select-item.tsx.

Select.Label

PropTypeDefault
classNamestring | ((state: SelectGroupLabelState) => string | undefined)CSS class applied to the element, or a function that returns a class based on the component's state.
renderComponentRenderFn<HTMLProps, SelectGroupLabelState> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleCSSProperties | ((state: SelectGroupLabelState) => CSSProperties | undefined)Style applied to the element, or a function that returns a style object based on the component's state.

Plus the DOM props of the element it renders. Source: select/components/select-label.tsx.

Select.ScrollDownButton

PropTypeDefault
classNamestring | ((state: SelectScrollDownArrowState) => string | undefined)CSS class applied to the element, or a function that returns a class based on the component's state.
keepMountedbooleanWhether to keep the HTML element in the DOM while the select popup is not scrollable.
renderComponentRenderFn<HTMLProps, SelectScrollDownArrowState> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleCSSProperties | ((state: SelectScrollDownArrowState) => CSSProperties | undefined)Style applied to the element, or a function that returns a style object based on the component's state.

Plus the DOM props of the element it renders. Source: select/components/select-scroll-down-button.tsx.

Select.ScrollUpButton

PropTypeDefault
classNamestring | ((state: SelectScrollUpArrowState) => string | undefined)CSS class applied to the element, or a function that returns a class based on the component's state.
keepMountedbooleanWhether to keep the HTML element in the DOM while the select popup is not scrollable.
renderComponentRenderFn<HTMLProps, SelectScrollUpArrowState> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleCSSProperties | ((state: SelectScrollUpArrowState) => CSSProperties | undefined)Style applied to the element, or a function that returns a style object based on the component's state.

Plus the DOM props of the element it renders. Source: select/components/select-scroll-up-button.tsx.

Select.Separator

PropTypeDefault
classNamestring | ((state: SeparatorState) => string | undefined)CSS class applied to the element, or a function that returns a class based on the component's state.
orientationOrientationThe orientation of the separator.
renderComponentRenderFn<HTMLProps, SeparatorState> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleCSSProperties | ((state: SeparatorState) => CSSProperties | undefined)Style applied to the element, or a function that returns a style object based on the component's state.

Plus the DOM props of the element it renders. Source: select/components/select-separator.tsx.

Select.Trigger

PropTypeDefault
size"default" | "sm""default"
childrenReactNode
classNamestring | ((state: SelectTriggerState) => string | undefined)CSS class applied to the element, or a function that returns a class based on the component's state.
disabledbooleanWhether the component should ignore user interaction.
nativeButtonbooleanWhether the component renders a native <button> element when replacing it via the render prop. Set to false if the rendered element is not a button (for example, <div>).
renderComponentRenderFn<HTMLProps, SelectTriggerState> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleCSSProperties | ((state: SelectTriggerState) => CSSProperties | undefined)Style applied to the element, or a function that returns a style object based on the component's state.

Plus the DOM props of the element it renders. Source: select/components/select-trigger.tsx.

Select.Value

PropTypeDefault
children((value: any) => ReactNode) | ReactNodeAccepts a function that returns a ReactNode to format the selected value.
classNamestring | ((state: SelectValueState) => string | undefined)CSS class applied to the element, or a function that returns a class based on the component's state.
placeholderReactNodeThe placeholder value to display when no value is selected. This is overridden by children if specified, or by a null item's label in items.
renderComponentRenderFn<HTMLProps, SelectValueState> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleCSSProperties | ((state: SelectValueState) => CSSProperties | undefined)Style applied to the element, or a function that returns a style object based on the component's state.

Plus the DOM props of the element it renders. Source: select/components/select-value.tsx.