--- title: Select description: A dropdown for selecting a single value from a list. links: doc: https://base-ui.com/react/components/select#api-reference --- ## Preview ## Installation CLI Manual ```bash npx @olyx/cli@latest add select ``` Install the following dependencies: ```bash npm install @base-ui/react ``` Copy and paste the following code into your project. Update the import paths to match your project setup. ## Usage ```tsx import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select" ``` ```tsx ``` ## API Reference ### Select Root component. Alias for `Select.Root` from Base UI. ### SelectTrigger Trigger button that opens the select dropdown. Styled wrapper for `Select.Trigger` from Base UI. ### SelectValue Displays the selected value. Styled wrapper for `Select.Value` from Base UI. ### SelectContent Popup container for select options. Wraps `Select.Portal`, `Select.Positioner`, and `Select.Popup` from Base UI. | Prop | Type | Default | | ---------------------- | --------- | ---------- | | `side` | `string` | `"bottom"` | | `sideOffset` | `number` | `4` | | `align` | `string` | `"center"` | | `alignOffset` | `number` | `0` | | `alignItemWithTrigger` | `boolean` | `false` | ### SelectItem Individual select option. Styled wrapper for `Select.Item` from Base UI with built-in indicator. ### SelectGroup Groups related select items. Alias for `Select.Group` from Base UI. ### SelectLabel Label for a select group. Styled wrapper for `Select.GroupLabel` from Base UI. ### SelectSeparator Visual separator between items. Styled wrapper for `Select.Separator` from Base UI. ## Examples For accessible labelling and validation, prefer using the `Field` component to wrap selects. See the related example: [Select field](/ui/docs/components/field#select-field). ### Disabled ### With Groups