Select Field
Select Fields allow users to choose from a list of options.
Overview
Select Fields allow users to choose from a list of options. They can be used when a large number of familiar or predictable options are available. Select Fields require the user to click to reveal the options available to them, in many cases Radio Fields are a better option.
Usage
Select Fields can either be passed a list of options, or render options as children.
Edit live code
Content
- Always put options in a logical order. Where appropriate, put the most common options at the top.
- Never use Select Fields if you want users to read all of the options.
Variations
With options as children
Edit live code
Autocomplete
Browser autofill on this field is controlled by a transitional theme property. Learn how to enable it in your app.
Properties
| Name | Values | Default |
|---|---|---|
id (required) | String | |
label (required) | String | |
optional | Boolean | false |
hint | ReactNode | |
error | ReactNode | |
characters | Number | 25 |
fullWidth | alwaysneversmall | small |
value (required) | String | |
options | {value: string; label: string;}[] | |
onValueChange(newValue) => null | Function | |
autoCompleteDefaults to "off" when the disableAutocomplete theme config flag is enabled (see the Theme guide); pass autoComplete to override for a specific field. | String | |
... | JSX.IntrinsicElements["select"] |