Select
Single select with native label, description, and error associations that optionally switches to a searchable combobox.
Use Select for one value from a list when showing every option at once would take too much space. Give it a visible label or an aria-label.
Interactive example
Loading interactive example
API
Inherited prop contracts
Pick<HTMLButtonAttributes, "id" | "aria-describedby" | "aria-invalid" | "aria-label" | "aria-labelledby">Only the listed props from this native base are accepted.
| Member | Type | Kind | Required | Default |
|---|---|---|---|---|
disabled | boolean | prop | No | false |
emptyText | string | prop | No | 'No results' |
error | string | prop | No | undefined |
hint | string | prop | No | undefined |
label | string | prop | No | undefined |
onValueChange | (value: T) => void | callback | No | undefined |
optionLabel | (value: T) => string | callback | No | undefined |
options | readonly T[] | readonly SelectOption<T>[] | prop | Yes | |
placeholder | string | prop | No | undefined |
searchable | boolean | prop | No | false |
value | T | binding | No | undefined as T | undefined |
Examples
Source
Loading source