Skip to Content
ARCUI

Dropdown

Anchored provider-owned overlay with consumer-rendered trigger, collision-aware placement, item semantics, and dismissal lifecycle.

Dropdown owns measurement, positioning, open state, dismissal, and overlay rendering. The consumer owns the trigger's visual presentation.

Basic usage

<Dropdown
  items={[
    { label: "Details", value: "details", icon: "info" },
    { label: "Delete", value: "delete", tone: "danger" },
  ]}
  onSelect={(value, item) => handleAction(value, item)}
  trigger={({ onPress, isOpen, disabled }) => (
    <Button onPress={onPress} disabled={disabled}>
      {isOpen ? "Close" : "Actions"}
    </Button>
  )}
/>

ARCUI does not clone or inspect the returned trigger element.

Trigger contract

The render prop receives:

{
  onPress: () => void;
  isOpen: boolean;
  disabled: boolean;
}

Use those values to keep custom trigger presentation and semantics synchronized with Dropdown ownership.

Trigger valueMeaning
onPressToggle the provider-owned Dropdown.
isOpenWhether this Dropdown is currently presented by the Host.
disabledMirrors the Dropdown disabled state for custom trigger semantics.

Items

Each item requires a human-readable label and stable unique value.

{
  label: "Archive",
  value: "archive",
  icon: "check",
  disabled: false,
  tone: "neutral",
  separator: true,
}

Duplicate values are an identity invariant and are rejected clearly.

onSelect is called only for an enabled item and receives both its value and the complete item object.

Use tone="neutral" (default) or tone="danger" for each item. Color priority is:

item.colors
-> Dropdown colors.item
-> item tone
-> Dropdown tokens

For example, an item can customize just its text while leaving its background and icon colors semantic:

{
  label: "Delete",
  value: "delete",
  tone: "danger",
  colors: {
    text: { default: "rgba(211,47,47,1)" },
  },
}

Dropdown-level colors also exposes background, border, separator, and item slots. Every omitted slot falls back to the matching semantic state; use a { light, dark } pair for animated theme-aware overrides.

Example
ARCUI Dropdown item presentations

Placement

bottom-start
bottom-end
top-start
top-end

Default: bottom-end.

Placement is preferred rather than absolute. ARCUI measures the trigger and available safe viewport and may flip vertically when the opposite side provides more usable space.

Example
ARCUI Dropdown real bottom-end hosted menu aligned to the right edge of the trigger
Bottom-end: the menu appears below the trigger, aligned to its right edge.
Example
ARCUI Dropdown real top-start hosted menu above the trigger
Top-start: the menu appears above the trigger, aligned to its left edge.

Scrolling and size

maxVisibleItems limits the normal number of item heights before internal scrolling. Larger accessibility text can naturally require more height per item and remains constrained by the available safe viewport.

Motion

Dismissal

Dropdown closes through its provider-owned lifecycle on enabled-item selection, trigger toggle, passive outside dismissal, availability changes, and supported platform lifecycle events.

Testing

Use testID where the public component contract exposes it so application tests can target the ARCUI-owned root without depending on visual implementation details. Component-specific stable descendants may use documented suffixes.

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

API Reference

IDropdown

PropTypeDefaultDescription
itemsreadonly TDropdownItem[]required—
onSelect(value: string, item: TDropdownItem) => voidrequiredCalled after an enabled item is selected. The full item is provided so consumers do not need to search their items array again when metadata is required.
trigger(props: TDropdownTriggerProps) => ReactNoderequiredRender prop for the trigger. ARCUI does not clone or inspect the returned element.
placement?TDropdownPlacement"bottom-end"Preferred placement. ARCUI may flip vertically when the opposite side provides more usable viewport space.
maxVisibleItems?number—Maximum number of normal item heights visible before scrolling. Larger accessibility text may naturally require more height per item and is still constrained by the available viewport.
disabled?boolean——
colors?Readonly<IDropdownColors>—Per-instance ARCUI-owned color overrides.
style?StyleProp<ViewStyle>—Style applied to the trigger measurement wrapper.
testID?string——

Per-instance color slots: IDropdownColors

PropTypeDefaultDescription
background?TThemeColor——
border?TThemeColor——
separator?TThemeColor——
item?Readonly<IDropdownItemColors>——

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.

TDropdownItem

PropTypeDefaultDescription
labelstringrequiredHuman-readable item label.
valuestringrequiredStable item identity returned through onSelect. Values must be unique within a Dropdown. Duplicate values are rejected as an identity invariant.
icon?IIcon["type"]——
disabled?boolean——
tone?TDropdownItemTone"neutral"Semantic item palette.
colors?Readonly<IDropdownItemColors>—Per-item ARCUI-owned color overrides. Resolution priority: item colors > Dropdown colors.item > tone > Dropdown tokens.
separator?boolean—Renders a separator below this item.
testID?string—Optional item-level test identifier. When omitted, Dropdown derives one from its own testID and value.

Per-instance color slots: IDropdownItemColors

PropTypeDefaultDescription
background?Readonly<IDropdownItemBackgroundColors>——
text?Readonly<IDropdownItemContentColors>——
icon?Readonly<IDropdownItemContentColors>——

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.

TDropdownTriggerProps

PropTypeDefaultDescription
onPress() => voidrequiredToggles the Dropdown. The trigger owns its visual presentation while ARCUI owns measurement, positioning, open state, and dismissal.
isOpenbooleanrequiredWhether this Dropdown is currently presented by the host.
disabledbooleanrequiredMirrors the Dropdown disabled state so custom triggers can expose the same interaction state visually and semantically.

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

The generated table above covers ARCUI-owned public props from the source-aligned type snapshot. Native inherited surfaces remain available where the public type extends React Native props.

Motion

Dropdown open/close and floating presentation use ARCUI overlay motion; trigger/open semantics and item selection remain React/host-owned.

Motion
Bottom-end placement: the hosted menu opens beneath the trigger and aligns to its right edge.
Motion
Top-start placement: the hosted menu opens above the trigger and aligns to its left edge.

See Motion for the library-wide model.

Performance

Keep application semantics at normal React update cadence. ARCUI components avoid using React state as a frame-by-frame animation driver; use the component callbacks and let Reanimated own continuous visual work.

See Performance for broader guidance.

Accessibility

ARCUI uses native roles, labels, semantic accessibility state, centralized font scaling, and localizable ARCUI-owned strings where the component owns behavior text. Consumer accessibility overrides remain available when they do not conflict with component correctness.

See Accessibility for the library-wide model.

Theming

This component resolves its normal presentation from ARCUI tokens and active theme context. Prefer token configuration for system-wide design changes and component props for genuine instance-level exceptions.

Relevant token areas include:

colors.*.dropdown
sizings.dropdown
radius.dropdown
border.dropdown
dropdownAnimations
zIndex

Top-level token overrides are shallow. Compose changed built-in namespaces from defaultTokens rather than relying on recursive merge behavior.

See Tokens and Theming.

Try it live

Open the existing React Native Snack to explore Dropdown interactively.

Open in Expo Snack ↗

On this page