Components / Choice

MultiSelect

Tags with autocomplete, async options and on-the-fly creation.

@ruckc/truss-ui Choice

Import

import { MultiSelect } from '@ruckc/truss-ui';

Playground

value

API

PropTypeDefaultDescription
options Option[][]The choices to offer.
loadOptions (query: string, signal: AbortSignal) => Promise<Option[]>—Async source of options: receives the query and an `AbortSignal`, returns the matching options.
value bindable string[][]The current value. Bind it with `bind:value`.
label string—Visible label shown above the control.
ariaLabel string—Accessible name when no visible `label` is shown.
placeholder string'Add…'Hint shown while the field is empty.
allowCreate booleanfalseOffer `Create "text"`; Enter or comma commits free text as a new tag.
disabled booleanfalseDisables the control: it cannot be focused, changed or activated.
error string—Error message. Marks the control invalid, replaces the hint, and is announced to assistive technology.
debounce number200Milliseconds to wait after typing before querying `loadOptions`.
/docs/multi-select Truss UI · MIT