Skip to Content
ARCUI

Select

Controlled single- or multiple-selection field with local/remote search, grouped options, chips, and explicit selection limits.

Select is a controlled field with mutually exclusive single and multiple ownership modes. It owns presentation/open/search UI while the application owns the selected value(s).

Options

const options = [
  { label: "Design", value: "design" },
  { label: "Engineering", value: "engineering", icon: "info" },
  { label: "Archived", value: "archived", disabled: true },
  { label: "iOS", value: "ios", group: "Platform" },
];

value is stable option identity. group adds a visual group header; disabled prevents selection; icon uses the ARCUI icon registry.

Single selection

const [value, setValue] = useState<string | null>(null);

<Select
  label="Team"
  value={value}
  onValueChange={setValue}
  options={options}
/>

Single mode requires value; use null for no selection. Selecting the currently selected option requests null, then closes the list.

Multiple selection

const [values, setValues] = useState<string[]>([]);

<Select
  multiple
  values={values}
  onValuesChange={setValues}
  options={options}
  maxSelect={3}
/>

Multiple mode keeps the list open while values are toggled. maxSelect prevents selecting additional unselected options after the limit is reached; already-selected options can still be removed.

Selected values render as Chips in the trigger. maxChipsVisible controls visible chips before ARCUI compacts the remainder into +N.

Example
ARCUI Select multiple-selection presentation

Controlled ownership invariants

TypeScript models Select as a discriminated union and ARCUI mirrors the critical invariant at runtime:

single mode:
  requires value (null = no selection)
  must not receive values

multiple mode:
  requires values
  must not receive value

Select never mutates your controlled array/value internally.

Selected option metadata cache

For remote search, selected options can temporarily disappear from the current options list. ARCUI keeps selected option metadata for rendered labels/chips so the trigger does not lose the visible name merely because the current remote result set changed.

Selection state itself still comes only from your controlled value / values.

<Select
  searchable
  value={value}
  onValueChange={setValue}
  options={options}
/>

Without onSearchAsync, ARCUI filters supplied options locally by label.

searchPlaceholder overrides the localized provider string. searchAccessibilityLabel independently names the search field for assistive technology.

Motion
<Select
  value={value}
  onValueChange={setValue}
  options={remoteOptions}
  onSearchAsync={setQuery}
  searchLoading={loading}
  searchDebounce={300}
/>

When onSearchAsync is present, filtering/result ownership belongs to the consumer. ARCUI debounces the callback and renders searchLoading as consumer-owned loading state.

Closing/resetting external search may request onSearchAsync(""); treat the empty string as a valid reset query.

Invalid negative/non-finite searchDebounce values fall back to 300ms with a development diagnostic.

State and availability

<Select
  label="Country"
  placeholder="Choose a country"
  error={error}
  disabled={disabled}
  active={active}
  emptyLabel="Nothing found"
  value={value}
  onValueChange={setValue}
  options={options}
/>

Visual modifier priority is resolved independently as:

disabled
-> inactive
-> error
-> open
-> normal

disabled and active={false} both prevent interaction and close/reset an open Select, but remain distinct semantic/visual states.

A non-empty error renders a separate alert row using ARCUI entering/exiting behavior.

Example
ARCUI Select states

Geometry and scrolling

  • itemHeight — base structural row height before ARCUI font scaling;
  • maxVisibleItems — maximum row particles before internal scrolling;
  • maxChipsVisible — selected trigger chips before +N compaction.

When search is enabled, ARCUI enforces enough visible particles for search + result/empty content. Invalid cosmetic geometry degrades to safe token values with development diagnostics.

Example
ARCUI Select trigger and menu positioning

Open/close lifecycle

The trigger uses combobox semantics. The list:

  • closes on single selection;
  • remains open for multiple selection;
  • closes on Android hardware back;
  • supports accessibility escape;
  • becomes non-interactive/hidden from accessibility when closed.

Search query/debounce lifecycle is cleaned up on close/unmount.

Accessibility

The trigger exposes:

role = combobox
expanded = open state
disabled = interaction-disabled state
accessibilityValue = current selection summary

The open list exposes list semantics and busy during external search loading. Search input uses searchbox/search semantics. Error content is a polite alert.

ARCUI does not add generic screen-reader gesture instructions.

Testing

With testID="team-select", stable targets include:

team-select
team-select-label
team-select-value
team-select-placeholder
team-select-chevron
team-select-list
team-select-search
team-select-empty
team-select-item-<value>
team-select-chip-<value>
team-select-error-row
team-select-error

Use team-select-value or team-select-placeholder depending on trigger state. Item/chip suffixes derive from your stable option values.

For provider setup and react-native-arc-ui/testing, see Testing.

API Reference

Single Select

PropTypeDefaultDescription
options?readonly TSelectOption[][]Available Select options. Select never mutates this array.
colors?Readonly<ISelectColors>—Per-instance ARCUI-owned color overrides. Partial overrides fall back to Select tokens for the matching visual state.
searchable?booleanfalseEnables local filtering. When onSearchAsync is supplied, filtering is delegated to the consumer instead.
onSearchAsync?(query: string) => void—Called after the configured debounce when remote/external search is being used. The consumer owns the resulting options.
searchDebounce?number300Search callback debounce in milliseconds.
searchPlaceholder?string—Search input placeholder.
searchLoading?booleanfalseConsumer-owned loading state for external search. This avoids Select guessing the lifetime of asynchronous work.
label?string—Optional field label.
placeholder?string—Placeholder shown while no value is selected.
error?string—Optional validation message.
emptyLabel?string—Label shown when no options match. Falls back to the localized ARCUI empty-state string.
disabled?booleanfalseDisables interaction and applies disabled visuals.
active?booleantrueInactive retains its dedicated visual state while preventing interaction.
itemHeight?number—Base option-row height before ARCUI font scaling. Falls back to tokens.sizings.select.itemHeight.
maxVisibleItems?number—Maximum number of structural list rows visible before internal scrolling. Search, group-header, option, and empty-state rows each count toward this limit. Falls back to tokens.sizings.select.maxVisibleItems.
maxChipsVisible?number—Maximum number of selected chips rendered in the trigger. Remaining selections are represented by a +N chip. Falls back to tokens.sizings.select.maxChipsVisible.
accessibilityLabel?string—Overrides the trigger accessibility label. Falls back to label, then placeholder where possible.
accessibilityHint?string—Optional additional accessibility guidance for the Select trigger. ARCUI does not provide generic screen-reader gesture instructions.
searchAccessibilityLabel?string—Overrides the search input accessibility label.
style?StyleProp<ViewStyle>——
testID?string——
multiple?falsefalseSingle-selection mode.
valueTSelectValue | nullrequiredCurrent selected value. Select is controlled. null represents no selection.
onValueChange?(value: TSelectValue | null) => void—Called when Select requests a selected-value change.

Multiple Select

PropTypeDefaultDescription
options?readonly TSelectOption[][]Available Select options. Select never mutates this array.
colors?Readonly<ISelectColors>—Per-instance ARCUI-owned color overrides. Partial overrides fall back to Select tokens for the matching visual state.
searchable?booleanfalseEnables local filtering. When onSearchAsync is supplied, filtering is delegated to the consumer instead.
onSearchAsync?(query: string) => void—Called after the configured debounce when remote/external search is being used. The consumer owns the resulting options.
searchDebounce?number300Search callback debounce in milliseconds.
searchPlaceholder?string—Search input placeholder.
searchLoading?booleanfalseConsumer-owned loading state for external search. This avoids Select guessing the lifetime of asynchronous work.
label?string—Optional field label.
placeholder?string—Placeholder shown while no value is selected.
error?string—Optional validation message.
emptyLabel?string—Label shown when no options match. Falls back to the localized ARCUI empty-state string.
disabled?booleanfalseDisables interaction and applies disabled visuals.
active?booleantrueInactive retains its dedicated visual state while preventing interaction.
itemHeight?number—Base option-row height before ARCUI font scaling. Falls back to tokens.sizings.select.itemHeight.
maxVisibleItems?number—Maximum number of structural list rows visible before internal scrolling. Search, group-header, option, and empty-state rows each count toward this limit. Falls back to tokens.sizings.select.maxVisibleItems.
maxChipsVisible?number—Maximum number of selected chips rendered in the trigger. Remaining selections are represented by a +N chip. Falls back to tokens.sizings.select.maxChipsVisible.
accessibilityLabel?string—Overrides the trigger accessibility label. Falls back to label, then placeholder where possible.
accessibilityHint?string—Optional additional accessibility guidance for the Select trigger. ARCUI does not provide generic screen-reader gesture instructions.
searchAccessibilityLabel?string—Overrides the search input accessibility label.
style?StyleProp<ViewStyle>——
testID?string——
multipletruerequiredEnables multiple-selection mode.
valuesreadonly TSelectValue[]requiredCurrent selected values. Select is controlled and never mutates the supplied array.
onValuesChange?(values: TSelectValue[]) => void—Called with the requested next selected-value array.
maxSelect?number—Maximum number of simultaneously selected values. Omit for no explicit maximum.

Per-instance color slots: ISelectColors

PropTypeDefaultDescription
border?Readonly<ISelectBorderColors>——
background?Readonly<ISelectTwoStateColors>——
label?Readonly<ISelectTwoStateColors>——
text?Readonly<ISelectTextColors>——
icon?Readonly<ISelectTwoStateColors>——
loading?TThemeColor——
error?TThemeColor——
item?Readonly<ISelectItemColors>——
search?Readonly<ISelectSearchColors>——
emptyState?TThemeColor——
groupHeader?TThemeColor——

Generated from the ARCUI 2.0.0 TypeScript source snapshot. Native inherited props remain available through the referenced React Native surface.

Generated from the ARCUI 2.0.0 TypeScript source snapshot. Native inherited props remain available through the referenced React Native surface.

Motion

Open state, modifier colors, chevron/list presentation, dynamic list height, selected-chip layout, theme interpolation, and error presence use ARCUI motion primitives. Reduced Motion snaps/removes non-essential transitions.

Independent SharedValues prevent unrelated semantic modifiers from being forced through one ordinal state machine.

Performance

Search filtering/grouping/selected metadata are memoized at semantic React cadence. Continuous open/modifier/theme transitions stay on the UI thread. Async search remains consumer-owned so Select does not guess request lifetime or introduce hidden promise state.

Theming

Relevant token areas include:

colors.*.select
sizings.select
radius.select
radius.selectItem
border.select
typography.select
selectAnimations
enteringExiting
animations

Try it live

Explore Select interactively in Expo Snack.

Open Select in Expo Snack ↗

On this page