Select allows users pick a value from predefined options. Ideally, it should be used when there are more than 2 options,
otherwise you might consider using a radio group instead. Currently only supports native browser select.
Basic usage
If Select is controlled, you should specify an onChange handler and pass the value prop through. For uncontrolled,
omit value and include an optional defaultValue
Custom Select
SelectMenu is also available to provide some custom UIProps
Select| Name | Type | Description |
error | boolean | Error / Danger mode |
className | string | - |
disabled | boolean | Disabled input |
labelText | string | Ghost/floating label. |
value | string | Value for select |
defaultValue | string | Value for uncontrolled |
helperText | string | Additional text to help guide user |
onChange | FormEventHandler<HTMLSelectElement> | Callback fired when the value is changed |
size | "small" | "medium" | "large" | Size of input |
includeEmptyOption | boolean | Add an empty option if labelText / ghostLabel is present |
isRequired | boolean | Whether the input is required |
requiredIndicator | string | The label for the required indicator (defaults to *) |