Select
Displays a list of options triggered by a button. Content defaults to align="start" for writing-direction friendliness. For a native <select>, see Native Select.
Basic
Open a list of options from a button trigger.
Installation
CLI
Also needs
npm i lucide-reactComposition
structure
Usage
select.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | — | On `Select` — controlled selected value. |
| defaultValue | string | — | On `Select` — uncontrolled initial value. |
| onValueChange | (value: string) => void | — | Called when the selected value changes. |
| size | "sm" · "default" | "default" | On `SelectTrigger` — `h-7` or `h-8`. |
| position | "item-aligned" · "popper" | "item-aligned" | On `SelectContent` — popup positioning strategy. |
| align | "start" · "center" · "end" | "start" | On `SelectContent` — horizontal alignment. |
| disabled | boolean | false | Disable the select or an individual item. |