Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Multi-select

ProNew

Choose several options: chips inside the field, a text input that filters the list, and checkmarks that stay open.

Installation

pnpm dlx shadcn@latest add @viewport/multi-select

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
options*MultiSelectOption[]—
valuestring[]—
defaultValuestring[][]
onValueChange(value: string[]) => void—
placeholderstring

Shown while nothing is selected and nothing is typed.

"Select…"
emptyTextstring

Shown when the search matches nothing.

"No results"

Accessibility

  • Focus never leaves the input; Enter toggles the highlighted option.
  • Backspace on an empty input removes the last chip, and every chip has a labelled remove button.
  • Each addition and removal is announced.
  • Respects prefers-reduced-motion.