MultiSelect
Choose multiple collection items in a searchable tag field.
Use MultiSelect for several selected collection items displayed as tags. Its values resolve through collection items; use Select for one choice or Combobox for editable single selection.
Basic usage#
Playground#
Anatomy#
MultiSelect renders its portaled popup collection internally. Tags have a separate rendering path through tagRender.
Usage#
Values and tag lifecycle#
The control slot wraps the interactive tags container and floating anchor. When non-editable, clicking the control opens the panel by default; when editable (search or createItem), clicking the control focuses the input without opening the panel so users can type immediately. Use openOnControlClick to explicitly override this default behavior.
value contains the selected item values as an array. An empty array means no selection; an empty
string can be one of the item values. Pair value with onValueChange for controlled selection.
Without search, printable keys trigger collection typeahead. Enabling search={true} allows
users to type directly in the field to filter available options.
Item creation and delimiters#
Providing createItem transforms unmatched query text into a valid TItem on Enter or when a token
separator is encountered. Separator characters (like comma or space) and pasted strings are automatically
parsed through the same creation path.
Keyboard interaction#
| Key | Behavior |
|---|---|
| Backspace | When input is empty, deletes the immediately preceding tag |
| ArrowDown / ArrowUp | Open popup or move focus through the options list |
| Enter | Commit the highlighted item (or create an item when input text is present) |
| Escape | Close the dropdown or clear active query text |
Virtualization#
Add createListVirtualizer when rendering the full collection makes opening or scrolling slow.
Read the Virtualization guide for setup, row measurements, stable keys, and keyboard navigation.
Examples#
Custom tag rendering#
Use tagRender to customize chip presentation with colors, status dots, badges, or custom remove buttons.
Project assignees#
Selection and display limits#
maxCount is a behavioral constraint preventing additional selections. maxTagCount is purely
visual: surplus selections stay committed and are summarized in a +N badge. Use tagOverflow
to render the hidden tags in a Tooltip or another custom presentation.
Creatable collection items#
Allow users to select from existing options or dynamically generate new tags via an empty state button.
Free-form tags#
Without predefined items, combine createItem and tokenSeparators for a lightweight tag input.
Grouped options#
Organize large collections into categorized option groups.
Clearable, disabled, and locked states#
Pre-locked items cannot be deselected, while individual options can be disabled in the listbox.
Form integration#
Validate multi-selection schemas (e.g. requiring a minimum number of tags) with createForm.
Attributes#
data-closedSlot: multi-select-control, multi-select-content, multi-select-triggerDescription: Present when disclosure or transition content is closed.data-disabledSlot: multi-select-control, multi-select-item, multi-select-triggerDescription: Present when the component, slot, or item is disabled.data-editableSlot: multi-select-controlDescription: Present when the value can be edited as text.data-expandedSlot: multi-select-control, multi-select-content, multi-select-triggerDescription: Present when the panel, accordion, or menu is expanded.data-invalidSlot: multi-select-control, multi-select-triggerDescription: Present when the field or form has a validation error.data-readonlySlot: multi-select-controlDescription: Present when the field is in read-only mode.data-requiredSlot: multi-select-controlDescription: Present when the field input is required.data-tagsSlot: multi-select-controlDescription: Present when the control is displaying selected values as tags.data-sideSlot: multi-select-contentDescription: Stores the resolved floating or drawer content side.data-highlightedSlot: multi-select-item, multi-select-item-descriptionDescription: Present when the item is highlighted by pointer or keyboard navigation.data-selectedSlot: multi-select-itemDescription: Present when the item or tab is selected.data-duplicateSlot: multi-select-inputDescription: Present when the entered value duplicates an existing value.data-loadingSlot: multi-select-triggerDescription: Present when the component or async operation is loading.Props#
Renders a <div> element by default.