Getting started
Components
At its most basic, a Select has an options list that's styled according to the browser default. A Combobox has a Twilio-styled options list and can allow for additional functionality like typeahead.
Use a Select when:
Use a Combobox when:
Make sure to connect the Label to the Select. This is done with the htmlFor prop on the label, and the id prop on the select. Those two need to match.
Use a select when:
Sort options in a list logically (e.g., alphabetically, ascending, descending).
Don't order options in a list randomly or in a "recommended" order that hasn't been validated with users.
Use a safe and reversible option as the default selected value, or an option that tells users to choose from the list.
Don't restrict users to options that unnecessarily reinforce biases and discrimination, such as gender binaries.
Keep option text concise and simple.
Avoid long option text that may truncate if it's longer than the width of the container.
Include a visible label on every form field.
Don't use prefix/suffix text as a replacement for a label.
Use a checkbox group to allow users to make multiple selections.
When possible, avoid allowing multiple selection on a select component.
Source code | Usage guidelines | Accessibility
Help us improve this component by providing feedback, asking questions on Slack, or updating this file on GitHub.