Andeus Designfor Reactv0.1
Components · Forms

MultiSelect

Pick several values from a list. Chips sit in the field, a checklist opens below, and typing filters it. Backspace removes the last chip.

jsx
import { MultiSelect } from '@andeus/ui';

With colour and a cap

HoldingsUp to 4
jsx
const [holdings, setHoldings] = useState(['SPY', 'QQQ']);

<MultiSelect label="Holdings" hint="Up to 4" max={4} value={holdings} onChange={setHoldings}
  options={[
    { value: 'SPY', label: 'SPY', color: 'var(--screen-yellow)' },
    { value: 'QQQ', label: 'QQQ', color: 'var(--screen-blue)' },
    'TLT', 'GLD', 'BIL'
  ]} />

Empty and error

Tags
RecipientsPick at least one
jsx
<MultiSelect label="Tags" options={['Momentum', 'Defensive', 'Income']} placeholder="Add tags" />
<MultiSelect label="Recipients" options={['Ines', 'Marek', 'Sana']} error="Pick at least one" />

Props

PropTypeDefault
optionsArray<string | { value, label, color?, hint? }>Required
valuestring[][]Controlled with onChange; or pass defaultValue / defaultChecked.
labelstring | ReactNode—Printed under the field.
hintstring—
errorstring—
placeholderstring'Choose'
maxnumber—Caps the picks and disables the rest.
searchablebooleantrueType to filter.
size's' | 'm' | 'l''m'
disabledbooleanfalse
PreviousSelectNextCheckbox