# Combobox

Type to find one or several values in a longer list.

Import from `@a31labs/rax/combobox`.

## Usage

```tsx
<Field label="Region"><Combobox value={region} onValueChange={setRegion} items={regions} /></Field>
<Combobox multiple value={ids} onValueChange={setIds} items={results} onQueryChange={search} onCreate={create} />
```

## Rules

Props: `items` (`{ value, label, keywords }`), `value` and `onValueChange` (a string, or `string[]` with `multiple`), `placeholder`, `onQueryChange`, `onCreate`, `emptyText`, `disabled`, `name`, `container`. `ref`, `id` and `aria-*` go to the input, so it works inside Field; with `name` the value posts through a hidden input. Same shape as Input with a chevron trigger. In `multiple` mode the selection shows as surface-3 chips inside the box, each with a "Remove <label>" button. The popup is a floating layer that looks like Select's. Filtering matches label, value and keywords, ignoring case. With `onQueryChange` the app filters (async search) and the component does not. `onCreate` adds a final "Create “query”" option when no label matches exactly. Use Select for short fixed lists and Combobox once people need to search.

Page: https://rax.a31.at/components/combobox
