Skip to content

Data Input

MultiSelector

Multi-select combobox for choosing several options.

import { MultiSelector } from '@var-ui/react';

MultiSelector

Dropdown that selects multiple options at once. Always controlled via value (option values) and onValueChange. The trigger summarizes the current selection as a comma-separated label list.

Examples

Default

Pass options as { value, label, disabled? }[] and seed value with the selected values.

Demo.tsxTSX
import { MultiSelector } from '@var-ui/react';

<MultiSelector label="Teams" options={options} value={value} onValueChange={setValue} />

Controlled selection

Keep the selected values in React state and update them from onValueChange. The trigger text and any app UI that depends on the selection stay in sync.

Selection stays in React state

Selected: design, ops

Demo.tsxTSX
import { MultiSelector } from '@var-ui/react';
import { useState } from 'react';

const [value, setValue] = useState(['design', 'ops']);

<MultiSelector
  label="Teams"
  description="Selection stays in React state"
  options={options}
  value={value}
  onValueChange={setValue}
/>

Sizes

size (sm, md, lg) sets the trigger height, inset and type, matching TextField. It falls back to the surrounding control size (InputGroup, Toolbar, Select.Root), then md.

Props

Accessibility

The trigger is a button labeled by the field label plus the current summary text. The popover listbox uses selectionMode="multiple" with checkbox affordances on each item. Keep label visible, and use description / errorMessage (the error message is role="alert") so assistive tech gets the same help and validation copy as sighted users.