|
| 1 | +--- |
| 2 | +layout: component |
| 3 | +permalink: /components/form/combo-box |
| 4 | +has-parent: /components/form/ |
| 5 | +title: Combo box |
| 6 | +intro-text: "A combo box helps users select an item from a large list of options." |
| 7 | +research-title: Form controls |
| 8 | +status: use-with-caution-candidate |
| 9 | +figma-link: https://www.figma.com/design/afurtw4iqQe6y4gXfNfkkk/VADS-Component-Library?node-id=19200-2377 |
| 10 | +uswds-v3: default |
| 11 | +web-component: va-combo-box |
| 12 | +anchors: |
| 13 | + - anchor: Examples |
| 14 | + - anchor: Usage |
| 15 | + - anchor: Code usage |
| 16 | + - anchor: Accessibility considerations |
| 17 | + - anchor: Related |
| 18 | + - anchor: Component checklist |
| 19 | +--- |
| 20 | + |
| 21 | +## Examples |
| 22 | + |
| 23 | +### Default |
| 24 | + |
| 25 | +{% include storybook-preview.html story="uswds-va-combo-box--default" link_text="va-combo-box default" height="300px" %} |
| 26 | + |
| 27 | +### With Default Value |
| 28 | + |
| 29 | +{% include storybook-preview.html story="uswds-va-combo-box--with-default-value" link_text="va-combo-box with default value" height="300px" %} |
| 30 | + |
| 31 | +### With Error |
| 32 | + |
| 33 | +{% include storybook-preview.html story="uswds-va-combo-box--with-error" link_text="va-combo-box with error" height="300px" %} |
| 34 | + |
| 35 | +### Required |
| 36 | + |
| 37 | +{% include storybook-preview.html story="uswds-va-combo-box--required" link_text="va-combo-box required" height="300px" %} |
| 38 | + |
| 39 | +### With Placeholder Text |
| 40 | + |
| 41 | +{% include storybook-preview.html story="uswds-va-combo-box--with-placeholder-text" link_text="va-combo-box with placeholder text" height="300px" %} |
| 42 | + |
| 43 | +### With Hint Text |
| 44 | + |
| 45 | +{% include storybook-preview.html story="uswds-va-combo-box--with-hint-text" link_text="va-combo-box with hint text" height="300px" %} |
| 46 | + |
| 47 | +### With Message Aria Described By |
| 48 | + |
| 49 | +{% include storybook-preview.html story="uswds-va-combo-box--with-message-aria-described-by" link_text="uswds-va-combo-box with message aria described by" height="300px" %} |
| 50 | + |
| 51 | +## Usage |
| 52 | + |
| 53 | +<a class="vads-c-action-link--blue" href="https://designsystem.digital.gov/components/combo-box/">Refer to the U.S. Web Design System for usage guidance</a> |
| 54 | + |
| 55 | +{% include content/select-options.md %} |
| 56 | + |
| 57 | +### Errors |
| 58 | + |
| 59 | +* Refer to the specific [error example](#with-error) above. |
| 60 | + |
| 61 | +<a class="vads-c-action-link--blue" href="{{ site.baseurl }}/components/form/#error-handling"> |
| 62 | + View form error handling for additional guidance |
| 63 | +</a> |
| 64 | + |
| 65 | +### Hint text |
| 66 | + |
| 67 | +* Refer to the [hint text example](#with-hint-text) above. |
| 68 | + |
| 69 | +<a class="vads-c-action-link--blue" href="{{ site.baseurl }}/components/form/label#hint-text"> |
| 70 | + View label hint text for additional guidance |
| 71 | +</a> |
| 72 | + |
| 73 | +{% include component-docs.html component_name=page.web-component %} |
| 74 | + |
| 75 | +## Accessibility considerations |
| 76 | + |
| 77 | +<a class="vads-c-action-link--blue" href="https://designsystem.digital.gov/components/combo-box/#accessibility-guidance">Refer to the U.S. Web Design System for accessibility guidance</a> |
| 78 | + |
| 79 | +## Related |
| 80 | + |
| 81 | +* [Select]({{ site.baseurl }}/components/form/select) |
| 82 | +* [Radio button]({{ site.baseurl }}/components/form/radio-button) |
| 83 | +* [Search input]({{ site.baseurl }}/components/search-input) |
| 84 | + |
| 85 | +{% include _component-checklist.html component_name=page.web-component %} |
0 commit comments