Phase 9d · Tier B
RN-universal Combobox pilot
ScaffoldedSingle-select picker with typeahead. Composes RnPopover + RnCommand — no new runtime dep. Mirrors the shadcn Combobox surface (options array + value/onChange) plus controlled-mode open/onOpenChange for A2UI agents.
Side-by-side: pick a fruit
shadcn (Popover + cmdk)
Selected: (none)
RN
Selected: (none)
Search-text synonyms (RN)
Each option packs synonyms into searchText while the trigger displays a clean label. Try typing "vue", "shopify", or "universal".
Selected: (none)
Library decision
Per Phase 9 Q2, every Tier B primitive must record its library choice. RnCombobox ships with no new runtime dependency.
- shadcn Combobox is itself a Popover + cmdk composition. The RN-universal substitutes (
RnPopover0.2.1,RnCommand0.2.3) are already shipped, so this primitive is a thin composition shell — same code path on web and native. - Compared with downshift@9 (MIT, ~7M/wk): downshift solves the same combobox state machine but is DOM-coupled (uses
document.activeElement, DOM event listeners, and focus rings) and would force a.web/.nativesplit. Rejected for the same reason as cmdk. - Compared with react-native-paper Searchbar + Autocomplete (MIT): full UI kit; pulls Material Design styling and a Paper Provider. Out of scope for a single primitive.
Semantics
| Aspect | shadcn (Popover + cmdk) | RN | Notes |
|---|---|---|---|
| Trigger | Button (variant=outline) | Pressable + chevron + label | Same compact, full-width-by-default visual |
| Filter | fuzzy + score | substring (case-insensitive) | Pass `filter` prop for custom ranking |
| Empty state | <CommandEmpty> | <RnCommandEmpty> | Shown only after the user has typed and 0 match |
| Synonyms | value + keywords | searchText overrides label | Trigger shows label; filter sees searchText |
| Controlled value | value + onChange | value + onValueChange | A2UI agents drive both modes |
| Controlled open | (via Popover) | open + onOpenChange | Exposed at the root for declarative agent UIs |
| Single-select | yes | yes | Multi-select is a 0.2.x candidate |
| Auto-flip | no | no | Same perf-budget call as RnPopover |