Genesis
@beta

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

Import
Subpath export: @marktiderman/genesis-ui
import { Combobox } from "@marktiderman/genesis-ui";
Components
Auto-generated from TypeScript source via 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`.

PropTypeDefaultDescription
onChange*(value: T) => void—
options*readonly ComboboxOption<T>[]—
aria-labelstring—The trigger's accessible name when no visible label points at it.
classNamestring—
contentClassNamestring—
disabledboolean—
emptyTextReactNodeNo 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).
idstring—
placeholderstringSelect…The button's words with nothing chosen. Default "Select…".
searchPlaceholderstringSearch…The search box's placeholder and accessible name. Default "Search…".
testIDstringcombobox
valuestring | number—

ComboboxOption

An option a combobox lists: what it stores, what it shows, and a second line.

No declared props.

Storybook
Storybook hosts the canonical visual reference with controls for every variant.