Voit Docs
  • Read Me
  • Introduction
    • Get Started
  • Design Language
    • Philosophy
  • Accessing The Design System
    • Using Variables
  • Structure Overview
  • Accessibility & Inclusivity
  • Guidelines
    • Design tokens
  • Components
    • Overview
    • Accordion
    • Aspect Ratio
    • Badge
    • Breadcrumb
    • Button
    • Tab Button
    • Tile Button
    • Card (Header, Footer)
    • Checkbox
    • ComboBox
    • Digit Entry
    • Dimming Overlay
    • File Drop
    • Index Bar
    • Info Label
    • Inline Message
    • Link
    • List Item
    • List Tree
    • Page Control
    • Pagination
    • Popover
    • Progress Bar
    • Progress Indicator
    • Radio
    • Segmented Control
    • Select
    • Shortcut
    • Slider
    • Stepper
    • Switch
    • Tag
    • Text Area
    • Text field
    • Toast
    • Tooltip
    • Tool Bar
  • Legal
    • Terms & Conditions
    • Contact US
    • License Agreement
    • Feedback
Powered by GitBook
On this page
  • Overview
  • When to use
  • When not to use
  • Anatomy
  • Styles
  • States
  • Size
  • Accessibility
  • Example
  1. Components

ComboBox

ComboBoxes combine a text input with a dropdown menu, allowing users to either select an option from the list or enter their own value. It is a versatile component that enhance user input flexibility.

PreviousCheckboxNextDigit Entry

Last updated 7 months ago

Overview

A combobox combines the flexibility of a text input with the simplicity of a dropdown, allowing users to either select from a pre-defined list or type their own value.

When to use

  • Use a combobox when users need to select from a list of options but may also need the freedom to input their own custom value.

  • When a dropdown list contains many options, and searching within the list enhances usability, a combobox is an ideal solution.

  • Apply a combobox if the list of selectable options may change based on user input or contextual conditions, giving users flexibility to add new options.

  • In cases where you need to minimize space in forms, a combobox helps by combining a text field and dropdown into a single interactive component.

When not to use

  • If it’s essential that users compare all options before selecting, use a radio button or checkbox list, as comboboxes limit the number of visible options.

  • If the input requires extensive validation or complex formats, a combobox may not provide the necessary structure and could cause confusion.

  • If there are only a few options, a simple dropdown or radio buttons may be more efficient and clearer than a combobox.

Anatomy

  1. Icon Leading: An optional icon that appears at the start of the combobox input field, indicating the type of content.

  2. Label: Describes the field, guiding users on what to select or input.

  3. Tag: Representing selected items within the combobox field.

  4. Input Field: A text box where users can type to filter options or make a selection. It's the interactive area for text input.

  5. Count: Displays the number of items selected or available for selection.

  6. Icon Trailing: An icon (such as a dropdown arrow) located on the right side of the input field.

  7. Menu Option: The list of selectable items within the expanded menu. Users can scroll or type to search for options.

Styles

States

Size

Size
Text (px)
Icon (px)
Corner (px)
Container Height (px)

Small

14

20

8

32

Medium

14

20

8

42

Large

16

24

8

50

Accessibility

  • Keyboard Navigation: Ensure the combobox is fully accessible via keyboard. Users should be able to navigate through options using the arrow keys and select items with "Enter" or "Space."

  • Clear Focus Indicators: The focus state should be visibly distinct to assist users relying on keyboard navigation.

  • Screen Readers: Combobox components should clearly indicate when they are expanded or collapsed. Each option should be announced as users navigate through the list, and any custom value entered by the user should also be vocalized.

Example

  • Country Selection in a Form: A combobox allows users to either search for their country or type it directly, useful when handling extensive lists like countries or cities.

  • Product Search in an E-commerce App: Users can type in a product they’re looking for, and the combobox suggests matches from the store’s product catalog.

  • Adding Participants to an Event: A combobox allows users to select participants from a dropdown or input new participants’ emails if they’re not already in the system.

  • Searchable Dropdown for Customer Feedback: In a feedback form, users can either choose from common issues or type in a custom comment.