Components · Form Controls
Multi Select
BetaAdded v5.2.0
Pick several options as chips, with search, "+N more" and an optional create option.
import { MultiSelect } from '@nexub/react';Playground
Props
size
BugAccessibility
<MultiSelect aria-label="Labels" options={options} value={value} onValueChange={setValue} onCreate={…} placeholder="Add labels…" />Examples
Labels with create
People with server search
States
- BugAccessibility
default - BugAccessibility
disabled - BugAccessibility
readOnly - BugAccessibility
loading - BugAccessibility
size="sm" - BugAccessibility
size="md" - BugAccessibility
size="lg"
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| optionsrequired | MultiSelectOption[] | — | The options to pick from. |
| value | string[] | — | Selected values, controlled or not. |
| defaultValue | string[] | — | Selected values, controlled or not. |
| onValueChange | ((value: string[]) => void) | — | Called with the new selection. |
| maxVisibleChips | number | 3 | Chips shown before the rest collapse into "+N more". |
| onInputChange | ((text: string) => void) | — | Called as the user types. When set, options are shown as given, so you can fetch them. |
| onCreate | ((text: string) => void) | — | Adds a "Create “text”" option when the text matches no option. |
| loading | boolean | false | Skeleton rows instead of options; "Loading" is announced. |
| aria-label | string | — | Name the field: there is no visible label inside it. |
| aria-labelledby | string | — | Name the field: there is no visible label inside it. |
| onSearch | ((text: string) => void) | — | 11.2: async search (same as onInputChange); picked values keep their labels and avatars. |
| options[].description / disabled / avatar | string / boolean / ReactNode | — | 11.2: a second line (also searched), options that can't be picked, and an avatar in the list and on the chip. |
| className | string | — | |
| disabled | boolean | — | |
| emptyText | string | — | |
| id | string | — | |
| inputValue | string | — | Controlled search text. |
| placeholder | string | — | |
| readOnly | boolean | — | Shows the chips but nothing can be added or removed; stays focusable. |
| sheet | false | true | 'auto' | 'auto' (pass `sheet={false}` to keep a popover on small screens) | true: bottom sheet. 'auto': bottom sheet below the md breakpoint, a popover above. |
| size | 'sm' | 'md' | 'lg' | 'md' |
Accessibility
Keyboard
- Type
Filters the options and opens the list.
- ArrowDown / ArrowUp
Moves through the options.
- Enter
Toggles the highlighted option.
- Backspace
In an empty field, removes the last chip.
- Escape
Closes the list.
Screen reader
Options carry `aria-checked`; each chip has a "Remove <label>" button.
On iOS & Android: MultiSelect
@nexub/react-nativeAlpha
import { MultiSelect } from '@nexub/react-native';
<MultiSelect label="Labels" options={labels} value={picked} onValueChange={setPicked} />Web vs mobile
Same tokens and prop names. Where the platforms differ:
| Web | iOS & Android | |
|---|---|---|
| Menu | A popover list with chips in the field. | A sheet of checkbox rows (search above 8 options); the field summarises the picks. |
| Label | Compose Label + control + HelperText (or FormField). | One component: label, helperText and error are props. |
Interactive preview of @nexub/react-native rendered for the web. Native chrome (switches, pickers, Liquid Glass) looks like the platform on a device.
On device

iPhone (iOS simulator)

Pixel (Android emulator)
Screenshots from the latest CI run of the showcase app; the live frame renders the same code for the web.
MultiSelect props
| Prop | Type | Default | Description |
|---|---|---|---|
| labelrequired | string | — | — |
| optionsrequired | readonly MultiSelectOption<T>[] | — | — |
| value | T[] | — | — |
| defaultValue | T[] | — | — |
| onValueChange | (value: T[]) => void | — | — |
| placeholder | string | — | — |
| helperText | string | — | — |
| error | string | — | — |
| disabled | boolean | — | — |
| searchable | boolean | more than 8 options, or always with `onSearch`, `onInputChange` or `onCreate` | A search field above the options. |
| emptyText | string | 'No results found.' | Shown when the search finds nothing. |
| loading | boolean | — | The options are loading (when you run the search yourself): shows a loading row instead of the list. |
| inputValue | string | — | Controlled search text. |
| onInputChange | (text: string) => void | — | Called as the user types; options are then shown as given (no built-in filtering). |
| onSearch | (text: string) => Promise<readonly MultiSelectOption<T>[]> | void | — | Async search, called with the typed text after searchDebounce. Return a promise of options
and the sheet shows them, with a loading row and a retry row if it rejects; an answer that
arrives after a newer search started is ignored. Return nothing to set options and
loading yourself, as on web. Picked values keep their labels when they drop out of the list. |
| searchDebounce | number | 300 | Milliseconds to wait after the last keystroke before onSearch runs. |
| onCreate | (text: string) => void | — | Adds a "Create “text”" row when the search text matches no option exactly; called with the trimmed text. |
| maxVisibleChips | number | 2 | Chips shown in the field before the rest collapse into a "+N more" chip. |
| readOnly | boolean | — | Shows the chips but nothing can be added or removed; the sheet doesn't open. |
| size | FieldSize | 'lg' (48, the mobile field height) | — |
| style | StyleProp<ViewStyle> | — | — |