Design System React

AlphaThis a work in progress. Your input will help us to improve it. Report issues or raise questions on GitHub.

Select (dropdown)

JSX for this example
<React.Fragment />

Select configuration

Select components can use the following props:

className (optional)
A CSS class name to pass to the component.
defaultValue (optional)
The ID of the option that you want selected on page load.
errorMessage (optional)
Text to use for an error message.
hasError (optional)
Whether the field is in an error state. Boolean.
hintText (optional)
Text to use for a select's hint text.
id
Value to use for the select's id attribute.
label
Text to use for the select's associated label.
name (optional)
Value to use for the select's name attribute. Will fall back to using the id prop if not provided.
onBlur (optional)
Function to fire in response to a blur event.
onChange (optional)
Function to fire in response to a change event.
placeholder (optional)
Text to use for an optional unselected first option.
width (optional)
The width to use for the select element. The options are the same as for TextInput.