Select

Examples

Select Input

Copied to clipboard

Select Input with grouping

Copied to clipboard

Select Input Disabled

Copied to clipboard

Select Props

The Select component accepts the following props.

NameTypeRequiredDefaultDescription
children
node
content rendered inside the Select
className
string
''additional classes added to the Select control
value
any
''value of selected option
isValid
bool
trueFlag indicating selection is valid
isDisabled
bool
falseFlag indicating the Select is disabled
onBlur
func
() => undefinedOptional callback for updating when selection loses focus
onFocus
func
() => undefinedOptional callback for updating when selection gets focus
onChange
func
() => undefinedOptional callback for updating when selection changes
aria-label
custom
nullCustom flag to show that the Select requires an associated id or aria-label.

SelectOption Props

The SelectOption component accepts the following props.

NameTypeRequiredDefaultDescription
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
falseflag indicating if the option is disabled

SelectOptionGroup Props

The SelectOptionGroup component accepts the following props.

NameTypeRequiredDefaultDescription
children
node
nullcontent rendered inside the Select Option Group
className
string
''additional classes added to the Select Option
label
string
the label for the option
isDisabled
bool
falseflag indicating if the Option Group is disabled