MultiSelect
MultiSelect picks several values. It pairs a filterable listbox with a row of removable chips — click to toggle, Backspace on an empty input to drop the last chip.
What it is
A compound component holding a value array. MultiSelect.Root owns the selection, the filter
text, and the open state. MultiSelect.Chips renders the current selection as removable chips;
MultiSelect.Input is the type-to-filter field; MultiSelect.List is the multi-selectable
listbox. MultiSelect.SelectAll is an optional toggle for the whole filtered set.
Selection is toggle-on-click — clicking a selected option removes it, and the list stays open so
the user can keep picking. maxSelections caps the array; once it is full, further additions are
ignored.
Install
Anatomy
API
MultiSelect.Root
MultiSelect.Root
stablefunction MultiSelect.Root<T>(props: MultiSelectRootProps<T>): JSX.Element
The option set — each `{ value, label, disabled? }`.
The selected values, controlled or uncontrolled.
The filter text.
Custom filter predicate. Defaults to a case-insensitive substring match on `label`.
Cap on the number of selected values. Additions past the cap are a no-op.
Surface a `MultiSelect.SelectAll` toggle that selects every non-disabled option in the current filter.
MultiSelect.Chips
MultiSelect.Chips
stablefunction MultiSelect.Chips<T>(props: { renderChip: (option, info) => ReactNode }): JSX.ElementRenders one node per selected value. renderChip receives the option and an info object with a
remove callback and the chip's index.
MultiSelect.Input
The type-to-filter field. Backspace on an empty input removes the last chip — the standard chip-input affordance.
MultiSelect.List
The multi-selectable listbox — role="listbox" with aria-multiselectable="true". Takes the same
renderOption, placement, offset, and emptyMessage props as
Combobox.List.
MultiSelect.SelectAll
A toggle for the filtered set. Requires enableSelectAll on the Root. It clones its child with
role="checkbox" and an aria-checked of true, false, or "mixed".
Accessibility
The input is role="combobox"; the listbox is role="listbox" with
aria-multiselectable="true" and aria-selected on each row. The keyboard model matches
Combobox — arrow keys, Home, End — except Enter toggles an option without closing the list, since
the user is likely picking more. Each chip needs a remove control with an accessible name, e.g. an
icon button labelled "Remove TypeScript".
Examples
A tag picker with a cap: