Multi select (dropdown)
Offers a searchable and scrollable dropdown that allows users to select multiple values.
Examples
Usage
The multi-select component offers a customisable selection box that supports searching. It also enables multi-value selection, allowing users to seamlessly combine typing and scrolling to locate the desired items.
While multi select dropdowns can be powerful tools for user input, approach them with care. This interaction model which combines typing, scrolling, and selection can be confusing, particularly if feedback and validation are unclear. Users may also struggle with discoverability, not realising that multiple selections are possible without clear visual cues.
Thoughtful design and testing are essential to ensure this component enhances rather than hinders the user experience.
Do:
- match the select width to the length of the longest option rather than stretching it to other fields' widths
- provide clear instructions or labels so users understand they can select multiple items
- keep the list of options manageable to avoid overwhelming users
- include search to help users find options quickly
- test for keyboard and screen reader support
- usability test with your users to check this component is usable for them
Avoid:
- relying on this component if selections are complex or require detailed context, as multi select can be confusing
- using it for very small sets of options where simple checkboxes would be better
- overloading it with too many features or large data sets without testing performance and usability
- using it as the default multiple selection tool
- using mandatory multi select fields without clear guidance
Required paramaters
- multiple - allows multiple selections in the select list
- live-search - required on multi-select lists to ensure reliable keyboard navigation
- asp-for - binds the select list to a model property
- asp-items - specifies the items to be displayed in the select list
Optional parameters
- placeholder - provides a placeholder text when no item is selected
- guidance-text - displays guidance text below the select list
- field-column-widths - sets the column width for the select list
- additional-classes - adds custom CSS classes to the select list
- hide-validation-message - hides validation messages for the select list
- asp-is-disabled - disables the select list
- hide-label - hides the label for the select list
Are you sure you want to close without saving?
Any information you have entered will be lost!
Testing
Check that the multi select:
- can be navigated with keyboard only
- shows a visible focus state on the control and selected options
- expanded/collapsed state of the dropdown is communicated correctly to screen readers
- announces the label, role, available options and selected options correctly with screen readers
- hint text or instructions are read out by screen readers
- error messages are announced by screen readers and associated with the multi select
- does not trigger unexpected changes while an option is selected
- remains usable at 400% zoom and supports reflow without horizontal scrolling
- makes it clear when selecting an option will reveal additional fields
- does not create a keyboard trap when the option list is opened
- communicates dynamic updates appropriately (for example, "3 options selected")
- behaves consistently across supported browsers and devices
Developer considerations
When using the multi select component in your form:
- use a native <select multiple> by default, opting for a custom multi-select component only when users need built-in search filtering or are selecting from a large option set
- always provide a visible label using <label for=""> and an ID
- make sure the multi select has a programmatic name (via label or aria-labelledby)
- use aria-describedby to associate hint text and error messages with the multi select
- avoid pre-selecting options unless there is a clear user benefit and it does not create a risk of unintended choices
- make sure custom select components maintain native select behaviour
- write error messages that explain what went wrong and how to fix it
- make sure a visible focus state that meets contrast requirements
- make sure the component remains usable when text is resized and content reflows
- make sure sufficient touch target size and spacing, with a target size of at least 24 × 24 CSS pixels
Required fields
If your form contains fields that users must complete:
- clearly indicate when the multi select is required by using a visual indicator such as an asterisk
- do not rely on the visual indicator alone (for example, an asterisk) to communicate that a field is required and include the help text “Required fields are marked with an asterisk *” at the top of every page of the form
- make sure the required state of the multi select is programmatically available to assistive technologies using aria-required="true"
Conditional behaviour
If your multi select reveals additional content based on a user's selection:
- only reveal content when it is logically dependent on the selection
- do not automatically move focus when content is revealed
- place revealed content directly after the multi select that controls it in the DOM
- hide the content from all users, including assistive technology users, until it is needed
- make sure hidden fields are not focusable
- when revealed, make sure the content is reachable in the natural tab order
- consider adding hint text to explain that additional fields may appear
- use the Turas conditional reveal pattern so the new content is available to screen readers