Multi select
A field that opens a list for several choices: chips with a rolling "+N", drawn checks, chosen first, Select all and Clear, a limit, a draft until Done, search and ★ hold-and-drag ticking.
npx @swipeui/cli add multi-selectWhen to use it
- Choosing several options from a long list, such as languages, skills or notification types.
- Filters where people pick many categories at once.
- Assigning several tags from a fixed set.
When not to use it
- One choice. Use Dropdown or Combobox.
- A few choices that should stay visible. Use Checkbox group or Chip group.
- Free-form values people type. Use Tag input.
Installation
Run this from your app's root. If SwipeUI isn't set up yet, run npx @swipeui/cli init first; it sets up Uniwind, the theme tokens and the cn helper.
npx @swipeui/cli add multi-select- Adds
components/swipeui/ui/multi-select.tsx,components/swipeui/ui/use-multi-select.tsand 18 shared helpers. - Installs react-native-gesture-handler, react-native-reanimated, react-native-worklets, uniwind, clsx, tailwind-merge, expo-haptics, class-variance-authority, react-native-svg, react-native-safe-area-context, @expo/ui, @gorhom/bottom-sheet, expo-blur. In Expo apps it uses
npx expo installso versions match your SDK.
Usage
import { MultiSelect } from '@/components/swipeui/ui/multi-select';
<MultiSelect label="Cuisines" options={cuisines} searchable />;Short lists open in a popover (OverlayProvider); long or searchable ones in a sheet (SheetProvider).
Examples
At most three reviewers, kept as a draft until Done, summed up as a count:
<MultiSelect label="Reviewers" options={team} max={3} commit="apply" summary="count" />API reference
MultiSelectProps
| Prop | Type | Default | Description |
|---|---|---|---|
label | | — | The visible and spoken name. An empty string hides it visually. |
options | | — | The options, in order. |
groups? | | — | Group headings, in order. |
value? | | — | The chosen values (controlled), in option order. |
defaultValue? | | | The values chosen at first (uncontrolled). |
onValueChange? | | — | Reports the chosen values, in option order. |
placeholder? | | | Shown, muted, with nothing chosen. |
summary? | | | How the field sums up the choice: |
maxChips? | | | Chips shown before "+N". |
max? | | | The most that can be chosen. An extra pick is refused with a strain, a limit haptic and one announcement. |
selectedFirst? | | | Chosen options open at the top of the list (they stay put while you tick). |
showBulkActions? | | | "Select all" and "Clear" above the list. |
commit? | | |
|
searchable? | | | A search field above the list (accent-folded, ranked). Search needs the keyboard, so it implies a sheet. |
paintSelect? | | | ★ Hold a row, then drag down the list to tick (or untick) a run of rows, one tick each. |
holdDelay? | | | How long a finger rests on a row before painting starts, in milliseconds (content timing). |
clearable? | | | A clear button inside the field while something is chosen. |
presentation? | | |
|
maxListHeight? | | | The popover's tallest height before it scrolls, in points. |
helper? | | — | Supporting text under the field. |
error? | | — | Validation message. |
success? | | — | Confirmation text; replaces the helper. |
status? | | | Validation state shown on the field. |
required? | | | Marks the field required. |
requiredIndicator? | | | How a required field is marked. |
optionalIndicator? | | | Show "Optional" after the label. |
disabled? | | | No opening, ticking or clearing. |
disabledStyle? | | |
|
appearance? | | | The field's surface. |
size? | | |
|
shape? | | |
|
labelPlacement? | | | Where the label sits. |
focusRing? | | | The ring and halo while open. |
leadingIcon? | | — | A leading icon in the field. |
messages? | | | Built-in strings, for translation. |
haptics? | | | Haptics: a switch, or per part ( |
motion? | | | Field, chip, list and check motion. |
className? | | — | Classes on the field. |
style? | | — | Field style. |
testID? | | — | The trigger's identifier. The list appends |
Options are SelectionOptions from selection-core: value, label, description, detail, icon, group, disabled and disabledReason.
Composition and behavior
- The field sums up the choice as chips that grow in while their neighbours glide, then a rolling "+N" past
maxChips; or a rolling count; or comma-separated labels. - The list opens with the chosen options first and keeps that order while you tick, so rows don't jump. Each check draws on with a tick.
- ★ Hold a row and drag down to tick a run of rows, once each; starting on a ticked row unticks the run. Every row can still be tapped.
- Select all and Clear sit above the list;
maxrefuses an extra pick with a strain, a warning haptic and one announcement. commit="apply"keeps a draft until "Done (n)"; Cancel or closing the list throws it away.- 1.x props (
label,options,value,searchable,placeholder, …) keep working.
Multi select settings
| Prop | Does | Default |
|---|---|---|
| summary / maxChips | chips (then "+N"), count or labels; chips before "+N" | chips, 2 |
| max | The most that can be chosen | unlimited |
| selectedFirst | Chosen options open at the top | true |
| showBulkActions | Select all and Clear | true |
| commit | instant or apply (a draft until Done) | instant |
| searchable | A search field; implies a sheet | false |
| paintSelect / holdDelay | ★ Hold and drag to tick a run (ms to hold) | true, 300 |
| clearable | A clear button in the field | true |
| presentation | auto, popover or sheet | auto |
| maxListHeight | The popover's height before it scrolls (pt) | 320 |
| appearance / size / shape | Field look | filled, md, preset |
| helper / error / required / disabled | Field states | none |
| haptics | All, or { toggle, select, limit, clear } | on |
| messages | Bulk actions, "Done (n)", "+N", count, limit | English |
Behavior and gestures
- Tap the field to open the list: a popover for 7 options or fewer, a sheet for more or with `searchable`. Chosen options open at the top (`selectedFirst`) and stay put while you tick.
- Tap rows to tick them: each check draws on with a tick. The field sums them up as chips that grow in and glide aside, then a rolling "+N" past `maxChips` (`summary="chips"`), or a rolling count (`count`), or labels (`labels`).
- ★ Hold a row (300 ms) and drag down the list to tick a run of rows, once each; starting on a ticked row unticks the run (`paintSelect`).
- Select all and Clear sit above the list (`showBulkActions`); a clear button in the field empties it (`clearable`).
- `max` refuses an extra pick: the list strains once, a warning haptic plays and "You can choose up to n" is announced.
- `commit="apply"` keeps a draft until "Done (n)"; Cancel or closing throws it away. `instant` keeps each tick at once, and Done closes.
Accessibility
- The field is a button named "Label: chosen labels" (or the placeholder) that reports expanded; rows are checkboxes with checked state, and a disabled row speaks its reason.
- Painting always has a tap path: every row can be tapped. Select all, Clear and limits are announced.
- The search field is labelled and keeps focus while typing.
Motion
- Uses the
toggle,layout,list,number,overlayandpressmotion roles, so it follows your app's feel. Passmotionto tune this one instance. - Checks draw on the toggle role; chips fade in on the list role and their neighbours glide on the layout spring (measured leaves, never the field); "+N" and the count roll their digits; the list opens on the overlay role.
- Reduce Motion: chips appear in place, digits swap and checks appear without drawing; haptics stay.
Performance
- The list is plain rows (no nested virtualised list in a popover). Paint compares rows on the UI thread, one call per row.
Notes for AI
- Values are an array in option order. Options are `SelectionOption`s (icon, description, detail, group, disabledReason).
- Use `commit="apply"` when changes are costly (filters that refetch); `instant` for light settings.
- Popovers need `OverlayProvider`; sheets need `SheetProvider`.
Compatibility
| Runs on | Supported |
|---|---|
| Expo SDK 57 | Yes |
| Expo SDK 58 | Yes |
| React Native CLI (with Expo modules) | Yes |
| Expo Go | Yes |
| iOS | Yes |
| Android | Yes |
This table describes API support and static bundle checks. Native runtime, device accessibility and bare Uniwind compatibility remain pending.