SwipeUI

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-select
Variant
Preset
Material
Scheme
Feel
Real free component with a browser animation bridge. Native motion, haptics and materials need a device.

When 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.ts and 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 install so versions match your SDK.

Usage

app/filters.tsx
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

PropTypeDefaultDescription
labelstring—

The visible and spoken name. An empty string hides it visually.

optionsreadonly MultiSelectOption<T>[]—

The options, in order.

groups?readonly SelectionGroup[]—

Group headings, in order.

value?readonly T[]—

The chosen values (controlled), in option order.

defaultValue?readonly T[][]

The values chosen at first (uncontrolled).

onValueChange?((value: readonly T[]) => void)—

Reports the chosen values, in option order.

placeholder?string'Choose options'

Shown, muted, with nothing chosen.

summary?"chips" | "count" | "labels"'chips'

How the field sums up the choice: chips (up to maxChips, then a rolling "+N"), count ("3 selected") or labels (comma-separated, 1.x).

maxChips?number2

Chips shown before "+N".

max?numberunlimited

The most that can be chosen. An extra pick is refused with a strain, a limit haptic and one announcement.

selectedFirst?booleantrue

Chosen options open at the top of the list (they stay put while you tick).

showBulkActions?booleantrue

"Select all" and "Clear" above the list.

commit?"apply" | "instant"'instant'

instant keeps each tick at once; apply keeps a draft until "Done (n)", and Cancel or closing throws it away.

searchable?booleanfalse

A search field above the list (accent-folded, ranked). Search needs the keyboard, so it implies a sheet.

paintSelect?booleantrue

★ Hold a row, then drag down the list to tick (or untick) a run of rows, one tick each.

holdDelay?number300

How long a finger rests on a row before painting starts, in milliseconds (content timing).

clearable?booleantrue

A clear button inside the field while something is chosen.

presentation?SelectionPresentation'auto'

auto: a popover for 7 options or fewer without search, a sheet otherwise.

maxListHeight?number320

The popover's tallest height before it scrolls, in points.

helper?string—

Supporting text under the field.

error?string—

Validation message.

success?string—

Confirmation text; replaces the helper.

status?FieldStatus'idle'

Validation state shown on the field.

required?booleanfalse

Marks the field required.

requiredIndicator?FieldRequiredIndicator'asterisk'

How a required field is marked.

optionalIndicator?booleanfalse

Show "Optional" after the label.

disabled?booleanfalse

No opening, ticking or clearing.

disabledStyle?FieldDisabledStyle'muted'

muted or dim.

appearance?FieldAppearance'filled'

The field's surface.

size?FieldSize'md'

sm 36pt, md 44pt, lg 52pt.

shape?FieldShape'preset'

preset or pill.

labelPlacement?FieldLabelPlacement'above'

Where the label sits.

focusRing?FieldFocusRing'halo'

The ring and halo while open.

leadingIcon?ButtonIcon—

A leading icon in the field.

messages?Partial<MultiSelectMessages>English

Built-in strings, for translation.

haptics?boolean | SelectionHapticstrue

Haptics: a switch, or per part (toggle per tick and painted row, select to start a paint, limit at max, clear).

motion?MotionOverridethe app's feel

Field, chip, list and check motion.

className?string—

Classes on the field.

style?StyleProp<ViewStyle>—

Field style.

testID?string—

The trigger's identifier. The list appends -option (rows -option-<value>), plus -all, -none, -done, -cancel, -search, -clear, -paint.

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; max refuses 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

PropDoesDefault
summary / maxChipschips (then "+N"), count or labels; chips before "+N"chips, 2
maxThe most that can be chosenunlimited
selectedFirstChosen options open at the toptrue
showBulkActionsSelect all and Cleartrue
commitinstant or apply (a draft until Done)instant
searchableA search field; implies a sheetfalse
paintSelect / holdDelay★ Hold and drag to tick a run (ms to hold)true, 300
clearableA clear button in the fieldtrue
presentationauto, popover or sheetauto
maxListHeightThe popover's height before it scrolls (pt)320
appearance / size / shapeField lookfilled, md, preset
helper / error / required / disabledField statesnone
hapticsAll, or { toggle, select, limit, clear }on
messagesBulk actions, "Done (n)", "+N", count, limitEnglish

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, overlay and press motion roles, so it follows your app's feel. Pass motion to 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 onSupported
Expo SDK 57Yes
Expo SDK 58Yes
React Native CLI (with Expo modules)Yes
Expo GoYes
iOSYes
AndroidYes

This table describes API support and static bundle checks. Native runtime, device accessibility and bare Uniwind compatibility remain pending.

Related items