Live demo
Demo source
Use a multi-select when people choose several options from a predefined list, such as topics or regions. For one option, use a dropdown; for a few options that should stay visible, use checkboxes.
Anatomy
A multi-select field with four callouts: 1 marks the label Field label, 2 the field showing the prompt Input prompt, 3 the description below it, and 4 the chevron button at the right end of the field.
- Label (optional) says what to choose.
- Field shows the
placeholderprompt and, once options are chosen, a badge counting them. Dismissing the badge clears the selection. - Description (optional) explains how selection works.
- Chevron button opens and closes the list.
Open-list anatomy
An open multi-select showing two selected options and a scrollable list. Callouts mark 1 the count badge, 2 a selected option, 3 an unselected checkbox, 4 its label, 5 its description, 6 the divider and 7 the scrolling list.
- Count badge summarizes the selected options and can clear them.
- Selected options appear before the remaining options.
- Checkbox selects or deselects an individual option.
- Label identifies the option.
- Description (optional) helps distinguish similar choices.
- Divider separates selected and unselected sections in the implemented list.
- Scrolling list keeps additional options reachable when the list exceeds
maxHeight; the scrollbar's appearance follows the browser and platform.
The list
Each option is a checkbox with a label and an optional description, generated
from options or placed in the content slot as
checkbox dropdown items.
Selected options move to the top of the list, separated from unselected
options by a divider. filterable adds a search, and enableSelectAll adds a
checkbox for visible, enabled options. maxHeight limits the list height so
longer lists scroll. Keep related options in a predictable order.
The count badge summarizes the selection without replacing the option
labels. Describe a selection limit in the field description, and enforce
that limit in your application; descriptive text does not restrict value.
States
Hover and focus styles are built in. required marks the label with an
asterisk, a disabled field cannot be used, and a read-only field shows the
selection without allowing changes. Set error with an errorDescription
that says how to fix the selection. Error styling combines the red field
border, a warning icon and that message.
Size
Use size="sm" for a 32 px field or size="md" for the default 40 px field.
The field is capped at 480 px; fluid lets it fill a wider container.
Themes
The design includes Spark and Ocean appearances. Use the page's theme and mode controls to compare the live examples; retain the same labels, states and validation messages in each theme.
Keyboard use
Arrow Down opens the list. Arrow keys move between visible options, Enter or Space toggles the highlighted choice, and Escape closes the list. Keep the field label visible and use descriptions for information that must remain available while people choose.
Guidelines
- Name the field clearly and describe any limit, such as "Choose up to three".
- Keep option labels short, and order them alphabetically, by relevance or in logical groups.