Skip to content
Alea0.1

Forms

MultiSelect

Pick several options with checkboxes; the trigger sums up the picks. Search, Select all and Clear included.

Ant Design: Select mode="multiple"

import { MultiSelect } from '@alea/ui';

Examples

Pick several

The trigger sums up the picks; search appears with many options.

Topics

2 picked

Without actions

A short list without Select all, and a disabled one.

Plans
Regions

Props

MultiSelect props

Pick several options from a list with checkboxes; the trigger summarizes the picks (Ant Select mode="multiple", Mantine MultiSelect).

PropTypeDefaultDescription
itemsrequired{ id: Key; label: string; description?: string | undefined; }[]-The options: id, label, optional description.
defaultValueKey[]-The selected ids to start with.
descriptionReactNode-Help text shown under the field.
isDisabledboolean-Disables every part of it.
labelReactNode-The visible label.
onChange((keys: Key[]) => void)-Called with the selected ids.
placeholderstring'Select…'Shown while there is no value.
searchableboolean-Adds a search field to the list. Default true when there are more than 8 items.
showActionsbooleantrueAdds "Select all" and "Clear". Default true.
valueKey[]-The selected ids (controlled).

Accessibility

  • The trigger reads the label and the current picks.
  • The list is a listbox with aria-multiselectable.

Keyboard

KeyDoes
Enter or SpaceOpens
Arrow keysMove
SpaceToggles an option
EscapeCloses

Do and don't

Do

  • Show how many are picked in the trigger.
  • Add Select all and Clear for long lists.

Don't

  • Don't use it for two or three options: use checkboxes.
  • Don't hide the picks: summarize them in the trigger.
Tested with axe, keyboard and screen reader roles