Single Select
A compact dropdown for choosing one option.
Choose a framework
tsx
<Select
options={options}
placeholder="Choose a framework"
onChange={(value) => console.log(value)}
/>Component
A typed select component for single choice, multi-select, filtering, clearable controls, and selection previews.
Live previews paired with copyable source.
A compact dropdown for choosing one option.
<Select
options={options}
placeholder="Choose a framework"
onChange={(value) => console.log(value)}
/>Filter options and display selected values as tabs.
<Select
options={options}
multiple
searchable
preview="tabs"
placeholder="Search frameworks"
/>Use the preview prop to change how multiple selections are summarized.
<Select options={options} multiple preview="text" placeholder="Text preview" />
<Select options={options} multiple preview="badge" placeholder="Badge preview" />
<Select options={options} multiple preview="numbers" placeholder="Numbers preview" />
<Select options={options} multiple clearable placeholder="Clearable" />Props available on the component.
| Prop | Type | Default | Description |
|---|---|---|---|
| options | Option[] | required | Array of options with value and label fields. |
| onChange | (value: string | string[]) => void | undefined | Called when the selected value changes. |
| placeholder | string | 'Select...' | Text shown when nothing is selected. |
| multiple | boolean | false | Allows more than one option to be selected. |
| searchable | boolean | false | Adds an input for filtering the option list. |
| preview | 'tabs' | 'text' | 'badge' | 'numbers' | 'text' | Controls how selected values are displayed. |
| clearable | boolean | false | Shows a control for clearing the current selection. |
| disabled | boolean | false | Prevents the select from opening or changing. |