Combobox
Combobox — pick one option from a list you can search: the twin of genesis-ui-native's NativeCombobox, built from Command in a Popover. The trigger is a button that opens a listbox; the search box inside is the combobox (arrow keys move, Enter picks, Escape closes). The search is genesis-core's (`filterOptions`), so the web and the phone find the same options. It is a form field that picks one value. A filter bar that picks several, with counts, is the data layer's `FilterCombobox`.
packages/ui/src/components/ui/combobox.tsx
@marktiderman/genesis-uiimport { Combobox } from "@marktiderman/genesis-ui";react-docgen-typescript.Combobox
Combobox — pick one option from a list you can search: the twin of genesis-ui-native's NativeCombobox, built from Command in a Popover. The trigger is a button that opens a listbox; the search box inside is the combobox (arrow keys move, Enter picks, Escape closes). The search is genesis-core's (`filterOptions`), so the web and the phone find the same options. It is a form field that picks one value. A filter bar that picks several, with counts, is the data layer's `FilterCombobox`.
| Prop | Type | Default | Description |
|---|---|---|---|
| onChange* | (value: T) => void | — | |
| options* | readonly ComboboxOption<T>[] | — | |
| aria-label | string | — | The trigger's accessible name when no visible label points at it. |
| className | string | — | |
| contentClassName | string | — | |
| disabled | boolean | — | |
| emptyText | ReactNode | No results. | Shown when the search matches nothing. Default "No results." |
| filter | ((options: readonly ComboboxOption<T>[], query: string) => ComboboxOption<T>[]) | — | Which options a search keeps. Default: every word typed, in the label or description, ignoring case and accents (genesis-core's `filterOptions`, as NativeCombobox). |
| id | string | — | |
| placeholder | string | Select… | The button's words with nothing chosen. Default "Select…". |
| searchPlaceholder | string | Search… | The search box's placeholder and accessible name. Default "Search…". |
| testID | string | combobox | |
| value | string | number | — |
ComboboxOption
An option a combobox lists: what it stores, what it shows, and a second line.
No declared props.