Components
Combo Box
Use with caution: candidateExamples
Default
View va-combo-box default in Storybook
With default value
View va-combo-box with default value in Storybook
With error
View va-combo-box with error in Storybook
Required
View va-combo-box required in Storybook
With placeholder text
View va-combo-box with placeholder text in Storybook
With hint text
View va-combo-box with hint text in Storybook
With message aria described by
View uswds-va-combo-box with message aria described by in Storybook
Usage
Choosing the right component for the task
When deciding which component to use, consider the number of options available to the user. The total number of options will determine which component is right for the task:
- 2 - 5 options: Use Radio button when there are only a few options that can all be exposed at once.
- 6 - 15 options: Use Select for a limited number of options.
- 16 - 100 options: Use Combo box, which combines a select with typeahead functionality for easier selection.
- 101+ options: Use Search Input with typeahead to help users quickly find the right option from a large set.
Exceptions to consider when choosing a component
In some cases, there are common outliers and exceptions to account for:
- When the options are known and memorable. Options like months, days, states, countries, and other familiar data groupings can be considered exceptions to choosing the right component. For example, the Combo box works well for Countries or States that benefit from both scrolling or typing to find the selection. Consider your user and evaluate if typing or comparing options would be a better user experience when finalizing the component choice.
- When the radio button labels are long or radio tiles contain descriptive text. Long labels within a dropdown might make it difficult to read and select an option. Radio tiles often include descriptive text that cannot be used in a dropdown. In these cases, Radio button may be the better choice.
- When the task is to sort a set of results. Use the dedicated Sort component, which utilizes a Select component as its foundation.
Contact the Design System team via #platform-design-system for help if you have other use cases that may be considered exceptions.
When the task requires multiple selections
The components above are for single-selection tasks. For multiple selections, use Checkbox. The same count thresholds may not apply. However, consider breaking long checkbox lists into grouped categories or using a different interaction pattern if the list exceeds 15 options.
Errors
- Refer to the specific error example above.
Hint text
- Refer to the hint text example above.
Code usage
Accessibility considerations
Use labels and hint text instead of placeholder text
Use the label to identify the field and hint text to provide additional instructions. Don’t use placeholder text to convey instructions or important information because placeholder text disappears when the user interacts with the combo box.
Labels and hint text persist after interaction, ensuring that instructions remain visible while the user makes a selection. See the hint text example for how to provide persistent instructional text.
Privacy guidance
When Personally Identifiable Information (PII) or Protected Health Information (PHI) is an option in a selection list, selections can’t be tracked in analytics or passed into other page elements that may be tracked.
- Analytics tracking for this component must remain off if the options contain PII or PHI.
- Selections can’t be utilized in elements on follow-on or related pages, such as a parameter or title tag.
Example: A form application asks the user to select a health condition from a dropdown list. Details about a person’s health conditions are considered PHI. The option selected can be stored in our data systems, but the selection can’t be tracked in analytics or utilized as part of the title tag in the next page.
Learn more about PII/PHI on the VA Platform website
Related
Component checklist
Web Platform
7 of 10 complete
Maturity
-
Guidance
-
Web
Examples, usage, code usage, content considerations, and accessibility considerations are all complete. -
Research
-
Web
VFS team conducted research on this component which is linked from this page. -
Stability
-
Web
Component has been in production for more than 3 months with no significant issues found. -
Adoption
-
Web
Multiple teams have adopted this component.
Accessibility
While this component has been previously tested against older criteria, it has not yet been audited with the updated testing criteria.
Code assets
-
Variations
-
Web
Storybook includes all variations (style, size, orientation, optional iconography, selection, error state, etc.) -
Responsive
-
Web
Component depicted in all responsive breakpoints. -
Interactive states
-
Web
Includes all interactive states that are applicable (hover, active, focus, keyboard focus, disabled). -
Tokens
-
N/A Web
All design attributes (color, typography, layout, etc.) are available as tokens. -
Internationalization
-
N/A Web
Describes i18n attributes.
Visual assets
-
Variations
-
Web
Figma library includes all variations (style, size, orientation, optional iconography, selection, error state, etc.) -
Responsive
-
Web
Component designed to work in all responsive breakpoints. -
Interactive states
-
Web
Includes all interactive states that are applicable (hover, active, focus, keyboard focus, disabled). -
Tokens
-
N/A Web
All design attributes (color, typography, layout, etc.) are available as tokens.
Legend:
-
Complete -
Incomplete - N/A Not applicable
Provide feedback
Share your feedback, report issues, or suggest improvements for the Combo Box component. Your input helps us make the design system better for everyone.
- Get immediate support in #platform-design-system for technical or urgent issues.
- Explore all feedback channels for additional ways to share your input.