Components

Select

Props
NameTypeDefaultDescription
idstring-'id' attribute to place on the base HTML element HTML id (If not specified then the name will be used)
classBlockstring-Block name override in BEM style classes applied to all elements
classModifiersModifiers[]BEM style modifiers to apply to the base HTML element
classNamestring-Extra classes to apply to the base HTML element
errorstring-Error message
hintstring-Hint
labelReactNode-REQUIRED. Label
optionsOption[]-REQUIRED. List of options to select from
widthnumber-Width of the field in characters (approximate)

When to use this component

The select component should only be used as a last resort in public-facing services because research shows that some users find selects very difficult to use.

How it works

The select component allows users to choose an option from a long list. Before using the select component, try asking users questions which will allow you to present them with fewer options.

Asking questions means you’re less likely to need to use the select component, and can consider using a different solution, such as radios.