Select
Examples
Select Props
The Select component accepts the following props.
Name | Type | Required | Default | Description |
---|---|---|---|---|
children | node | content rendered inside the Select | ||
className | string | '' | additional classes added to the Select control | |
value | any | '' | value of selected option | |
isValid | bool | true | Flag indicating selection is valid | |
isDisabled | bool | false | Flag indicating the Select is disabled | |
onBlur | func | () => undefined | Optional callback for updating when selection loses focus | |
onFocus | func | () => undefined | Optional callback for updating when selection gets focus | |
onChange | func | () => undefined | Optional callback for updating when selection changes | |
aria-label | custom | null | Custom flag to show that the Select requires an associated id or aria-label. |
SelectOption Props
The SelectOption component accepts the following props.
Name | Type | Required | Default | Description |
---|---|---|---|---|
className | string | '' | additional classes added to the Select Option | |
value | any | '' | the value for the option | |
label | string | the label for the option | ||
isDisabled | bool | false | flag indicating if the option is disabled |
SelectOptionGroup Props
The SelectOptionGroup component accepts the following props.
Name | Type | Required | Default | Description |
---|---|---|---|---|
children | node | null | content rendered inside the Select Option Group | |
className | string | '' | additional classes added to the Select Option | |
label | string | the label for the option | ||
isDisabled | bool | false | flag indicating if the Option Group is disabled |