OOratiq

Multi Select

Ready

Select many options as removable tags.

Requires cmdk

Installation

$ npx @oratiq-js/ui add multi-select

Copies the component and everything it depends on into your project, then lists the npm packages to install. The code is yours after this.

Usage

import
import { MultiSelect } from "@/components/ui/multi-select";

Behaviour

  • The list stays open while picking — multi-select means several choices, closing per pick would be hostile.
  • Selections render as dismissible chips in the trigger; overflow collapses to a +N chip.
  • Search filters the list via Command; keyboard navigation follows the writing direction.

Props

PropTypeDefaultDescription
options*{ value, label, disabled? }[]The selectable options.
value / defaultValuestring[]Selected values (controlled / uncontrolled).
onValueChange(values: string[]) => voidFires with the full selection.
maxShownnumber3Chips shown before collapsing to +N.

When to use

Two to five exclusive choices → Radio Group. One choice from many → Combobox. Several choices from many → this.

View source on GitHub → components/ui/multi-select.tsx