MultiSelect

Multi-value selection with removable tags, inline search, and an optional cap.

Import#

import { MultiSelect } from "astralis-ui";

Usage#

Selections render as removable chips in the trigger; typing filters the options, and Backspace with an empty search removes the last chip — the interaction set people know from tag pickers.

Max and disabled options#

Props#

PropTypeDefaultDescription
options{ value, label, disabled? }[] or grouped[]Option data; same group shape as Select.
value / defaultValue / onChangeArray<string | number> / same / (values) => void— / [] / —Controlled / uncontrolled API.
maxnumberCap on selected items.
clearablebooleanfalseClear-all button.
namestringRenders one hidden input per selected value (repeated name) for native <form> submission.
placeholder / emptyText / loadingSame behavior as Select.
variant / size / colorScheme"outline" / "md" / "brand"Styling; colorScheme tints the tags.
invalid / disabled / readOnlybooleanfalseState flags — inherited from Field.

Keyboard#

KeyAction
Open when closed; move the highlight down
Move the highlight up
EnterOpen; when open, toggle the highlighted option
typeFilter the options (typing also opens the list)
Backspace (empty input)Remove the last selected chip
EscClose
TabClose and move on

Accessibility#

Options carry role="option" in a portalled listbox with aria-multiselectable; chip remove buttons stay out of the tab order — Backspace is the keyboard path.