Select
A customizable select component for choosing from a list of options.
Installation
Install the required dependency for the Select component.
npm install @radix-ui/react-select
Basic Usage
The Select component provides a customizable dropdown menu for selecting an option.
Grouped Options
Group related options together with labels and separators.
Disabled State
A select component in its disabled state.
Props
The props you can pass to the Select component.
Prop
Type
Default
Description
valuestringundefinedThe controlled value of the select
defaultValuestringundefinedThe default value of the select
onValueChangefunctionundefinedCallback fired when the value changes
disabledbooleanfalseWhether the select is disabled
requiredbooleanfalseWhether the select is required
namestringundefinedThe name of the select when used in a form