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.
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 valueSelect 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.
Local search
<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.
External async search
<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
-> normaldisabled 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.
Geometry and scrolling
itemHeight— base structural row height before ARCUI font scaling;maxVisibleItems— maximum row particles before internal scrolling;maxChipsVisible— selected trigger chips before+Ncompaction.
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.
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 summaryThe 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-errorUse 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
| Prop | Type | Default | Description |
|---|---|---|---|
| options? | readonly TSelectOption[] | [] | Available Select options. Select never mutates this array. |
| searchable? | boolean | false | Enables 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? | number | 300 | Search callback debounce in milliseconds. |
| searchPlaceholder? | string | — | Search input placeholder. |
| searchLoading? | boolean | false | Consumer-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? | boolean | false | Disables interaction and applies disabled visuals. |
| active? | boolean | true | Inactive 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 row particles visible before internal scrolling. 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? | false | false | Single-selection mode. |
| value | TSelectValue | null | required | Current selected value. Select is controlled. null represents no selection. |
| onValueChange? | (value: TSelectValue | null) => void | — | Called when Select requests a selected-value change. |
Multiple Select
| Prop | Type | Default | Description |
|---|---|---|---|
| options? | readonly TSelectOption[] | [] | Available Select options. Select never mutates this array. |
| searchable? | boolean | false | Enables 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? | number | 300 | Search callback debounce in milliseconds. |
| searchPlaceholder? | string | — | Search input placeholder. |
| searchLoading? | boolean | false | Consumer-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? | boolean | false | Disables interaction and applies disabled visuals. |
| active? | boolean | true | Inactive 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 row particles visible before internal scrolling. 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 | true | required | Enables multiple-selection mode. |
| values | readonly TSelectValue[] | required | Current 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. |
Generated from the ARCUI 1.1.x 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
animationsTry it live
Explore Select interactively in Expo Snack.
Related components
InputOTP
Controlled 4–8 cell one-time-code input with numeric/alphanumeric validation, secure presentation, focus control, and completion callbacks.
Slider
Controlled single-value or range slider with UI-thread gesture motion, snapped live callbacks, commit callbacks, and native adjustable accessibility semantics.