Select list

v4.0.0

Select list is a web-only, form-based component that discloses a simple list of actions or options using the browser’s native <select> element.

Stylized artwork of a select list.

Considerations

Lightweight

A select list works best with a simple single-select list. If a list requires values with subtext, multi-select, or additional styling flexibility, use a Dropdown instead. If the list contains over 10 values and could benefit from filtering, use a Combobox instead.

Global

The select list inherits functionality and accessibility features from the browser’s native <select> element. The list styling is determined by the browser and operating system.

Form-based

A select list is only used within a form that submits a value and rarely on its own outside of a form. If the list includes actions or navigation, use a Dropdown.

Anatomy

Select list diagram with 4 elements numbered: 1. Label, 2. Value, 3. Disclosure indicator, 4. Container.
  1. Label
  2. Value
  3. Disclosure indicator
  4. Container

Properties

Label

The label describes the field’s purpose and expected input value. They are short, usually 4 or fewer words.

A select list with a ‘Date range’ label.

Label position

The label can be positioned above or beside the field.

Two select lists. A select list with a label sitting to the left of the container is below a select list with a label sitting above the container.

Label visibility

The label can be visible or hidden.

A visible label is strongly recommended to maintain accessibility and usability. However, if content elsewhere on the page is sufficiently acting as a label, like a section header or title element, the visual label can be hidden.

A select list with a ‘Date range’ section title.

Style

There are two styles available for select lists, bordered and Borderless.

Bordered
: has a visible container with a stroke for increased prominence.

Borderless
: has no visible container for lower prominence.

Two select lists. A select list in a container is sitting to the left of a borderless select list.

Size

Select lists are available in a large and small size.

Two select lists. A select list in a container is sitting to the left of a borderless select list.

Default value

The default value can be an empty value or a value from the list. The choice depends on use case.

By default, select list uses an empty default value. The empty value will fail validation if the field is required, so it’s useful for forcing a selection.

Alternatively, the default value can be set to the first option in the list. This default value is submitted even if a user hasn’t interacted with it. Use a value from the list as a default when it’s likely used by the majority of users.

Two select lists. A select list with an empty value sits to the left of a select list with a ‘Banana’ value.

Behavior

Browser styling

The list style is determined by the browser and platform.

Three select lists. Select lists on Safari on Mac showcase a dropdown that hovers over the select list container, with a checkmark value for the option selected. A select list on Safari on iOS showcases a dropdown that sits below the select list container, with a checkmark value for the option selected. A select list on Chrome on Android showcases a dropdown that sits below the select list container, with a radio button assigned for each option.

Screen sizes

Small

Select works the same across all screen sizes. The list menu style is determined by the device’s browser and operating system.

A Color select list with 5 option values on the eBay mobile app.

Medium and large

Select works the same across all screen sizes. The list menu style is determined by the device’s browser and operating system. Larger screens will try opening the list with the selected value aligned with the field’s value.

A Color select list with 5 option values on the eBay desktop site.

Best practices

Simple

Do use a select list when the list values are simple and short.

A Device type select list with 5 option values: Phone, Tablet, Laptop, Desktop, and TV.

Don’t use a select list if the list values need to use subtext or grouping. Use a Dropdown instead.

A Device select list with 5 option values expanding beyond the right edge of this image.

Filtering

Do use a select list when the list is small and simple.

A Color type select list with 6 option values: Red, Blue, Green, Yellow, Black, and White.

Don’t use a select list for extra large lists that could benefit from filtering. Use a Combobox instead.

An Item type select list with option values expanding beyond the bottom edge of this image.

List size

Do use a select list for lists larger than 3 items.

An Operating system select list with 5 option values: Android, iOS, MacOS, Windows, Linux.

Groups

Do use the same selection style within groups. If some selections require the additional functionality of a Dropdown, use a Dropdown for all items in the group.

Two select lists with the same styling sitting side by side.

Don’t mix selection styles in the same group.

Two select lists with different styling sitting side by side.

Usage

Do use select lists within forms.

A Color select list sits in a form layout with 3 other containers and a CTA button.

Don’t use select lists outside of a form as it is a traditionally form-based element.

A select list sits at the bottom of a footer on the eBay website.

Specs

A select list with a container and a borderless select list is shown with specs highlighted. Specs for select list with container: The space between the label and container is 4px, the height of the container is 48px, the padding to the left and right of content inside of the container is 16px, and the padding between the value and the disclosure indicator is 8px.  Specs for borderless select list: Padding between the label and value is 16px, and the padding between the value and disclosure indicator is 8px.

Change log

VersionDateNotes
4.0.0
Sep, 2024
  • Created with eBay Evo