Combobox

v3.0.0

The combobox combines a text field with a popover menu, allowing users to filter and choose an option from a list or enter their own value.

Stylized artwork of a combobox and a popover menu.

Considerations

Speed

Comboboxes provide the benefits of a menu with the speed of a text field.

Convenience

Comboboxes improve decision-making and entry speed by allowing for quick typing and matching.

Freedom

Comboboxes empower users by allowing them to type or select an item, and enter a value of their own if one doesn’t exist.

Anatomy

Combobox diagram with 4 elements numbered: 1. Label, 2. Value, 3. Menu, 4. Field container.
  1. Label
  2. Value
  3. Menu
  4. Field container

Properties

Label

Labels are required for all comboboxes. The label should succinctly describe the purpose of the field.

Field label sits on top of a combobox.

Value

A value can be optional or required depending on the context. A default value can be automatically populated, or the field can remain empty until a character is entered.

Value element sits inside of a combobox.

Layout

The field label can be stacked above the field or float within the field. Whichever is chosen, a single style should be used within a single form.

Two comboboxes, one with a Field label placed on top of the combobox, and the other sits inside of the combobox.

Size

Comboboxes are available in a small and large size. Large is the default and preferred size on compact screens.

Redlines visualizing the 48px height of the large combobox, and the 40px height of the small combobox.

Menu trigger

The menu popover progressively displays available values. The popover can be triggered on focus or as the user enters characters. Consider triggering the menu on focus if the content is more complex. When the content is familiar to the user, the menu can trigger as they enter characters instead.

An empty combobox with a popover list sits to the left of a combobox with characters entered and a popover list related to the characters.

Autocomplete

Autocomplete can be enabled to fill in a value without needing to type out all of the characters. The autocomplete value is selected when navigating away from the field.

Combobox with autocomplete in an active state with a popover, and combobox in an enabled state.

Single-select

Comboboxes that take a single value collapse the menu, set the value, and show the value as a single text element.

Single select value in combobox.

Multi-select

Comboboxes can accept multiple values in a single field. Each value converts to an input chip when selected from the menu list.

Three input chips in a combobox.

Flex height

When using input chips, the height of the combobox can flex to allow chips to wrap to a new line. Use flex height when it’s important to keep all values visible.

Mobile screen demonstrating flexible height of a combobox with multiple chips.

Helper text

Helper text is placed below the field. It guides the user on accurate input or how the input is used. Helper text can be shown persistently or on focus.

Helper text underneath a combobox.

Error messages

When a field fails validation, an error message appears to help the user successfully fulfill the input requirements. The error message is concise and direct.

If the field has helper text, it is replaced with the error message. The error icon appears next to the error message and remains visible while the field is in an invalid state.

Error message underneath a combobox.

Creating values

Comboboxes allow users to create new values. A “create new” option appears in the menu if there are 3 or fewer options matching an entry. The new value is added to the list when submitted.

An example of a Create new value option in a combobox.

Behavior

Min width

Comboboxes have a minimum width of 192px.

A combobox with a 192px width.

Max width

Comboboxes have a max width of 480px.

A combobox and popover menu with a 480px width.

Max height

Comboboxes set to flex height have a max height of 3 lines.

A combobox with 6 chips spanning 3 lines.

Horizontal overflow

For fields that don’t grow and wrap their content, the content overflows to keep the cursor visible as characters are entered. The field returns to the start of the input value when the field loses focus. Focusing on the field again returns to the end of the entry.

Horizontal overflow examples of a combobox with text applied, a combobox with text being added, a combobox with chips applied, and a combobox with chips being added.

Helper text overflow

Helper text spans the width of the field and wraps to a new line when extending beyond the field’s width.

Helper text spanning two lines underneath a combobox.

Screen sizes

Small

Comboboxes present differently according to platform on small screens.

A fullscreen Details modal on eBay mobile native displaying a combobox in an active state with a fullscreen list.

Native

Comboboxes on small screen native apps disclose values in a fullscreen modal when the field is active.

A fullscreen Details modal on eBay mobile web displaying a combobox in an active state with a popover list.

Web

Small screens on web disclose values in a popover menu when the field is active.

Medium

Comboboxes use a popover menu on medium screens.

A popover menu is shown on a combobox in a medium Details screen.

Large

Comboboxes use a popover menu on large screens.

A popover menu is shown on a combobox in a large Details screen.

Specs

A combobox sits to the left of a combobox with a menu popover.  Combobox dimensions: padding on the left and right of content is 16px, padding between Field label and combobox is 4px, padding between combobox and helper text is 8px. Padding between combobox and a menu popover is 4px.

Change log

VersionDateNotes
3.0.0
Sep, 2024
  • Updated to eBay Evo
3.0.0
Jan, 2024
  • Initial release of combobox in design library
  • Bumped to 3.0.0 for new addition