<!-- generated by scripts/gen-docs.mjs from docs/system/combobox.md. Edit the source and rerun. -->
# Combobox

## Description
Picks one value, or several, out of a list too long to scroll through: you type, and the list narrows to what matches.

`import { Combobox, ComboboxInput, ComboboxContent, ComboboxList, ComboboxItem, ComboboxEmpty, ComboboxStatus, ComboboxGroup, ComboboxGroupLabel, ComboboxCollection, ComboboxChips, ComboboxChip, ComboboxChipsInput, ComboboxValue } from "@/components/cobalt/ui/combobox"`, source `registry/cobalt/ui/combobox.tsx`, status `ready-with-gaps`.
Foundation: `Base UI Combobox`. Traps checked: `trap/field-label`, `trap/label-unbound`, `trap/field-error-link`, `trap/field-keeps-input`, `trap/select-value-lost`, `trap/select-empty-value`, `trap/select-async`, `trap/control-height`, `trap/focus-ring-shape`, `trap/hover-beats-focus`, `trap/disabled-still-hovers`, `trap/open-trigger-unfocused`, `trap/motion-origin`, `trap/scroll-chain`, `trap/overflow-scrollbar`, `trap/live-region-double`, `trap/touch-input-zoom`.

Where each trap is answered: `trap/field-label` and `trap/label-unbound` through `rule/input-has-a-label`, the input registers with the `Field` on its own (Base UI), so the `FieldLabel` names it, or a `<label htmlFor>`; `trap/field-error-link` through `rule/input-error-is-linked`; `trap/field-keeps-input` and `trap/select-value-lost` in `rule/combobox-value-survives-reload`; `trap/select-empty-value` in States, Clear empties a single combobox and Backspace removes chips; `trap/select-async` in `rule/combobox-async-waits` and State precedence, a search on its way shows the old answer and holds the empty sentence back; `trap/control-height` in Tokens, the field and the chips field measure 36px; `trap/focus-ring-shape` in States, the ring sits on the field's box; `trap/hover-beats-focus` and `trap/disabled-still-hovers`, the field has no hover look; `trap/open-trigger-unfocused`, focus stays in the input while the list is open, so the caret and the ring tie the two; `trap/motion-origin` in Motion, the list fades in place 4px below the field with nothing to grow from; `trap/scroll-chain` and `trap/overflow-scrollbar`, the list is `overscroll-contain` and scrolls only past 320px; `trap/live-region-double` in Accessibility, Empty and Status are the only live regions and a busy status shows no `Spinner` of its own; `trap/touch-input-zoom`, the input is 16px under 768px.

### Foundation
| Given by the foundation | Added by the team |
|---|---|
| Base UI `Combobox`: an input with `role="combobox"`, `aria-expanded` and `aria-activedescendant`, a portaled listbox, filtering of `items` as you type (or none with `filter={null}`), the highlight that follows the arrow keys and the pointer, Enter to pick, Escape to close, `multiple` with chips, Backspace and the arrow keys across chips, `Empty` and `Status` live regions, a hidden input for the form, `Clear` and `Trigger` buttons | The field drawn with the input group's box (`fieldBoxClasses` from `registry/cobalt/ui/input-group.tsx`), so it has Input's height, fill and Tab-only ring; `ComboboxInput` adds an optional leading glyph, a Clear button that fades in once there is a value and the chevron, both 28px with a 6px corner, 4px from the box's end; the popup on `--popover` at `--r-3xl` with `--shadow-floating`, 4px below the field at its start edge, as wide as it, fading with `popup-motion`; the list scrolls past 320px with 8px padding; options 38px at `--r-xl` with the grey fill only under the highlight, and one accent check at the end on a picked option; `ComboboxChips` keeps the field's 36px with 28px chips on the card colour; `busy` on `ComboboxList` dims the rows after the slow-wait delay, and `busy` on `ComboboxStatus` adds the spinning glyph; the portal container from `registry/cobalt/lib/portal.tsx`; the second click of the double-click that opened the list dropped, so it neither closes the list nor picks the option under the pointer (`guardOpeningClick`, measured at 1440 in `.design-system/evidence/sheet/phone-sheet-family-2026-10-17.json`); below 640px the sheet of the family `sheet.tsx` heads, with the grabber and the swipe, the search taking focus as the sheet opens by touch too, where Base UI focuses the popup so the keyboard stays down (`ComboboxSheet`, `registry/cobalt/ui/combobox.tsx:418-420`), the page's field button keeping the input's red wash when invalid (`SheetFieldButton`), and a chips field that keeps the height it opened with, up to three lines, scrolling inside past that, so a new line of chips never moves the list under the finger (`registry/cobalt/ui/combobox.tsx:274-279`) |

## Examples
Type to narrow 60 cities to the few that match; arrows or the pointer move the highlight.

Real uses, 0 call sites (`rg -n "<Combobox\b" app registry --glob '!registry/cobalt/ui/*'`): none yet. The source apps hand-roll four of them (`docs/research/2026-10-17-coverage.md`, row 4), and Select sends lists past 10 options here.

### Example files
| File | Covers | Caption |
|---|---|---|
| `docs/system/examples/combobox/default.tsx` | default | Type to narrow 60 cities; arrows or the pointer move the highlight |
| `docs/system/examples/combobox/multiple.tsx` | multiple=true | Several values sit as chips in the field; pick from the list, and remove one with its cross or Backspace |
| `docs/system/examples/combobox/async.tsx` | filter=null | Results come from a server; the last answer stays, dims and says Searching only past 250ms |
| Not applicable: type a word no city has in default.tsx | state:empty | The Empty sentence in place of the list |
| Not applicable: type in default.tsx, or open async.tsx while it searches | state:loading | The old results, dimmed, with "Searching" after 250ms |
| Not applicable: press ArrowDown in any example | state:open | The list 4px below the field |
| Not applicable: arrow or point at any option | state:highlighted | The grey fill on one option |
| Not applicable: open in-field.tsx, which holds a value | state:selected | The accent check at the option's end, no fill |
| Not applicable: reached with Tab on any example | state:focus-visible | The field's accent edge and ring |
| `docs/system/examples/combobox/state-disabled.tsx` | state:disabled | Disabled through the Field: it keeps its value at half opacity, does not open, and says why |
| `docs/system/examples/combobox/state-invalid.tsx` | state:invalid | The red wash on the field and an error that says what to pick, until an airport is chosen |
| `docs/system/examples/combobox/in-field.tsx` | composition:Field | Every time zone the browser knows, with the label and the description wired |
| `docs/system/examples/combobox/with-flags.tsx` | composition:Flag | Type to narrow forty countries; each option leads with its flag, and the field shows the chosen country's |

Example: Type to narrow 60 cities; arrows or the pointer move the highlight (`docs/system/examples/combobox/default.tsx`)

```tsx
import {
  Combobox,
  ComboboxContent,
  ComboboxEmpty,
  ComboboxInput,
  ComboboxItem,
  ComboboxList,
} from "@/components/cobalt/ui/combobox";
import { Field, FieldLabel } from "@/components/cobalt/ui/field";

const cities = [
  "Amsterdam", "Athens", "Auckland", "Bangkok", "Barcelona", "Berlin", "Bogotá", "Boston", "Brussels",
  "Budapest", "Buenos Aires", "Cairo", "Cape Town", "Chicago", "Copenhagen", "Dubai", "Dublin",
  "Edinburgh", "Florence", "Hanoi", "Helsinki", "Hong Kong", "Jakarta", "Kolkata", "Kyoto", "Lagos",
  "Lima", "Lisbon", "London", "Los Angeles", "Madrid", "Marrakesh", "Melbourne", "Mexico City",
  "Miami", "Milan", "Montreal", "Mumbai", "Munich", "Nairobi", "New York", "Oslo", "Paris", "Porto",
  "Prague", "Reykjavík", "Rome", "San Francisco", "Santiago", "São Paulo", "Seoul", "Singapore",
  "Stockholm", "Sydney", "Taipei", "Tokyo", "Toronto", "Vancouver", "Vienna", "Zürich",
];

export default function Example() {
  return (
    <Field className="w-full max-w-xs">
      <FieldLabel>Destination</FieldLabel>
      <Combobox items={cities}>
        <ComboboxInput placeholder="Search 60 cities" />
        <ComboboxContent>
          <ComboboxEmpty>No city matches. Check the spelling, or try the country.</ComboboxEmpty>
          <ComboboxList>
            {(city: string) => (
              <ComboboxItem key={city} value={city}>
                {city}
              </ComboboxItem>
            )}
          </ComboboxList>
        </ComboboxContent>
      </Combobox>
    </Field>
  );
}
```

Example: Every time zone the browser knows, with the label and the description wired (`docs/system/examples/combobox/in-field.tsx`)

```tsx
import { Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList } from "@/components/cobalt/ui/combobox";
import { Field, FieldDescription, FieldLabel } from "@/components/cobalt/ui/field";

const zones = (Intl as unknown as { supportedValuesOf(key: string): string[] })
  .supportedValuesOf("timeZone")
  .map((zone) => zone.replace(/_/g, " "));

export default function Example() {
  return (
    <Field className="w-full max-w-xs">
      <FieldLabel>Time zone</FieldLabel>
      <Combobox items={zones} defaultValue="Europe/Lisbon">
        <ComboboxInput placeholder="Search time zones" />
        <ComboboxContent>
          <ComboboxEmpty>No time zone matches. Try a city.</ComboboxEmpty>
          <ComboboxList>
            {(zone: string) => (
              <ComboboxItem key={zone} value={zone}>
                {zone}
              </ComboboxItem>
            )}
          </ComboboxList>
        </ComboboxContent>
      </Combobox>
      <FieldDescription>Check-in times on your listings follow this zone.</FieldDescription>
    </Field>
  );
}
```

Example: Type to narrow forty countries; each option leads with its flag, and the field shows the chosen country's (`docs/system/examples/combobox/with-flags.tsx`)

```tsx
import { useState } from "react";

import {
  Combobox,
  ComboboxContent,
  ComboboxEmpty,
  ComboboxInput,
  ComboboxItem,
  ComboboxList,
} from "@/components/cobalt/ui/combobox";
import { Field, FieldLabel } from "@/components/cobalt/ui/field";
import { countryName, Flag } from "@/components/cobalt/ui/flag";

type Country = { value: string; label: string };

// ISO 3166-1 codes, named by the platform's own list and sorted by name.
const countries: Country[] = (
  "AR AT AU BE BR CA CH CL CN CO CZ DE DK EG ES FI FR GB GR HK IE IN IS IT JP KE KR MA MX NG NL NO NZ PL PT SE SG TR US ZA"
)
  .split(" ")
  .map((code) => ({ value: code, label: countryName(code) }))
  .sort((a, b) => a.label.localeCompare(b.label, "en"));

export default function Example() {
  const [country, setCountry] = useState<Country | null>(null);
  const [text, setText] = useState("");
  // The flag stands for the chosen country, so it shows only while the field holds that name.
  const shown = country && text === country.label ? country : null;
  return (
    <Field className="w-full max-w-xs">
      <FieldLabel>Country of residence</FieldLabel>
      <Combobox<Country>
        items={countries}
        value={country}
        onValueChange={setCountry}
        inputValue={text}
        onInputValueChange={setText}
      >
        <ComboboxInput
          placeholder="Search 40 countries"
          {...(shown ? { icon: <Flag code={shown.value} decorative /> } : {})}
        />
        <ComboboxContent>
          <ComboboxEmpty>No country matches. Check the spelling.</ComboboxEmpty>
          <ComboboxList>
            {(c: Country) => (
              <ComboboxItem key={c.value} value={c}>
                {/* The name is the option's text, so the flag beside it is not read. */}
                <Flag code={c.value} decorative />
                {c.label}
              </ComboboxItem>
            )}
          </ComboboxList>
        </ComboboxContent>
      </Combobox>
    </Field>
  );
}
```

## Variants
Not applicable: one value or several is Base UI's `multiple` on the root, and a list the server filters is `filter={null}`; both are shown in the example files. The parts carry no variant prop.

Example: Several values sit as chips in the field; pick from the list, and remove one with its cross or Backspace (`docs/system/examples/combobox/multiple.tsx`)

```tsx
import { useRef } from "react";

import {
  Combobox,
  ComboboxChip,
  ComboboxChips,
  ComboboxChipsInput,
  ComboboxContent,
  ComboboxEmpty,
  ComboboxItem,
  ComboboxList,
  ComboboxValue,
} from "@/components/cobalt/ui/combobox";
import { Field, FieldLabel } from "@/components/cobalt/ui/field";

const strategies = [
  "Buyout", "Credit", "Distressed debt", "Fund of funds", "Growth equity", "Hedge fund",
  "Infrastructure", "Long only equity", "Macro", "Natural resources", "Private credit", "Real estate",
  "Secondaries", "Venture capital",
];

export default function Example() {
  const anchor = useRef<HTMLDivElement>(null);
  return (
    <Field className="w-full max-w-sm">
      <FieldLabel>Strategies</FieldLabel>
      <Combobox items={strategies} multiple defaultValue={["Private credit", "Venture capital"]}>
        <ComboboxChips ref={anchor} placeholder="Add a strategy">
          <ComboboxValue>
            {(values: string[]) => (
              <>
                {values.map((value) => (
                  <ComboboxChip key={value} removeLabel={`Remove ${value}`}>
                    {value}
                  </ComboboxChip>
                ))}
                <ComboboxChipsInput placeholder={values.length > 0 ? "" : "Add a strategy"} />
              </>
            )}
          </ComboboxValue>
        </ComboboxChips>
        <ComboboxContent anchor={anchor}>
          <ComboboxEmpty>No strategy matches.</ComboboxEmpty>
          <ComboboxList>
            {(strategy: string) => (
              <ComboboxItem key={strategy} value={strategy}>
                {strategy}
              </ComboboxItem>
            )}
          </ComboboxList>
        </ComboboxContent>
      </Combobox>
    </Field>
  );
}
```

Example: Results come from a server; the last answer stays, dims and says Searching only past 250ms (`docs/system/examples/combobox/async.tsx`)

```tsx
import { useEffect, useState } from "react";

import { SearchIcon } from "@/components/cobalt/icon";
import {
  Combobox,
  ComboboxContent,
  ComboboxEmpty,
  ComboboxInput,
  ComboboxItem,
  ComboboxList,
  ComboboxStatus,
} from "@/components/cobalt/ui/combobox";
import { Field, FieldLabel } from "@/components/cobalt/ui/field";
import { useSlowWait } from "@/lib/cobalt/use-slow-wait";

type Adviser = { value: string; label: string; city: string };

const advisers: Adviser[] = (
  [
  ["Alder Point Capital", "Boston"],
  ["Birchwood Partners", "Chicago"],
  ["Cedar Row Advisers", "Denver"],
  ["Elm Street Wealth", "Austin"],
  ["Fairhaven Asset Management", "Seattle"],
  ["Granite Bay Investors", "Sacramento"],
  ["Harbour Lane Capital", "New York"],
  ["Juniper Ridge Advisers", "Phoenix"],
  ["Kestrel Hill Partners", "Atlanta"],
  ["Larch Street Capital", "Portland"],
  ["Meadowbrook Advisers", "Minneapolis"],
  ["Northgate Wealth", "Philadelphia"],
] as [string, string][]
).map(([label, city]) => ({ value: label.toLowerCase().replace(/\s+/g, "-"), label: label, city: city }));

// Stands in for your search endpoint: it answers in 300 to 900ms.
function search(query: string): Promise<Adviser[]> {
  const q = query.trim().toLowerCase();
  const found = advisers.filter((a) => a.label.toLowerCase().includes(q));
  return new Promise((resolve) => setTimeout(() => resolve(found), 300 + Math.random() * 600));
}

export default function Example() {
  const [query, setQuery] = useState("");
  const [results, setResults] = useState<Adviser[]>(advisers);
  const [pending, setPending] = useState(false);
  const slow = useSlowWait(pending);
  useEffect(() => {
    let current = true;
    setPending(true);
    void search(query).then((found) => {
      if (!current) return;
      setResults(found);
      setPending(false);
    });
    return () => {
      current = false;
    };
  }, [query]);
  return (
    <Field className="w-full max-w-sm">
      <FieldLabel>Adviser</FieldLabel>
      <Combobox<Adviser>
        items={results}
        filter={null}
        inputValue={query}
        onInputValueChange={setQuery}
      >
        <ComboboxInput icon={<SearchIcon />} showTrigger={false} placeholder="Search advisers by name" />
        <ComboboxContent>
          <ComboboxStatus busy={slow}>{slow ? "Searching" : null}</ComboboxStatus>
          <ComboboxEmpty>{pending ? null : `No adviser is named “${query}”.`}</ComboboxEmpty>
          <ComboboxList busy={slow}>
            {(adviser: Adviser) => (
              <ComboboxItem key={adviser.value} value={adviser}>
                <span className="min-w-0 flex-1">{adviser.label}</span>
                <span className="text-xs text-muted-foreground">{adviser.city}</span>
              </ComboboxItem>
            )}
          </ComboboxList>
        </ComboboxContent>
      </Combobox>
    </Field>
  );
}
```

## States
| State | Trigger | What the user can do | Shown by, besides color | Checked by |
|---|---|---|---|---|
| empty field | no value | type, or open the list with the chevron or ArrowDown | the placeholder in `--muted-foreground`; no Clear button | test |
| filled | a value | edit the text, clear it, open the list | the value's label in the input; the Clear button | test |
| open | typing, ArrowDown, the chevron, a click in the input | move the highlight, pick with Enter or a press, close with Escape | the list, `aria-expanded="true"` on the input | test |
| highlighted option | ArrowDown or ArrowUp, or the pointer over an option | pick it with Enter | the grey fill, `data-highlighted`, `aria-activedescendant` on the input | by hand |
| selected option | the option is the value | pick another, or clear | the accent check at the end, `aria-selected`; no fill | by hand |
| no match | the text matches no option | change the text | the Empty sentence, read politely as it appears | by hand |
| loading | the host's search is on its way past 250ms | keep typing; the old rows stay | `busy` dims the rows to 55 percent and the Status line says "Searching" with a spinning glyph; before 250ms nothing changes (measured, `.design-system/evidence/combobox/measure.json`) | by hand |
| focus-visible | Tab into the input | type, open | the field's 1px `--primary` edge and 3px ring; a click shows only the caret | screenshot |
| disabled | `disabled` on the root | nothing | the field at half opacity; the input and buttons out of the tab order | by hand |
| invalid | `aria-invalid` on the input, or from `Field` | pick a value | the red wash and the linked error | by hand |
| chips | `multiple` with values | remove one with its cross or with Backspace, move across with ArrowLeft | one 28px chip per value, each with a named remove button | test |
| sheet | the screen is under 640px and `phone` is `sheet` | type in the field at the sheet's top, pick, close with the button, Escape, the scrim or a swipe down | the field and its results in a sheet 85svh tall over the scrim, the grabber in a 24px strip at its top, the search focused on open, the page's button naming the value, `data-sheet`; with chips, the field held at the height it opened with: measured the list's top at 227 through six picks, where a third line of chips moved it from 219 to 251 before (`.design-system/evidence/sheet/phone-sheet-family-2026-10-17.json`) | screenshot |
| swiping | a finger on the sheet moving down while the results are at their top, or the mouse on the grabber | let go past 30 percent of the sheet, or flick, to close it; let go short of that to keep it | the sheet under the finger, the scrim clearing with it, `data-swiping` on both | by hand |

Example: Disabled through the Field: it keeps its value at half opacity, does not open, and says why (`docs/system/examples/combobox/state-disabled.tsx`)

```tsx
import { Combobox, ComboboxContent, ComboboxInput, ComboboxItem, ComboboxList } from "@/components/cobalt/ui/combobox";
import { Field, FieldDescription, FieldLabel } from "@/components/cobalt/ui/field";

const currencies = ["Euro", "Pound sterling", "Swiss franc", "US dollar", "Yen"];

export default function Example() {
  return (
    <Field disabled className="w-full max-w-xs">
      <FieldLabel>Payout currency</FieldLabel>
      <Combobox items={currencies} defaultValue="US dollar">
        <ComboboxInput />
        <ComboboxContent>
          <ComboboxList>
            {(currency: string) => (
              <ComboboxItem key={currency} value={currency}>
                {currency}
              </ComboboxItem>
            )}
          </ComboboxList>
        </ComboboxContent>
      </Combobox>
      <FieldDescription>Set by your organisation for every payout.</FieldDescription>
    </Field>
  );
}
```

Example: The red wash on the field and an error that says what to pick, until an airport is chosen (`docs/system/examples/combobox/state-invalid.tsx`)

```tsx
import { useState } from "react";

import { Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList } from "@/components/cobalt/ui/combobox";
import { Field, FieldError, FieldLabel } from "@/components/cobalt/ui/field";

const airports = ["Amsterdam Schiphol", "Copenhagen Kastrup", "Frankfurt", "Heathrow", "Lisbon Humberto Delgado", "Madrid Barajas", "Paris Charles de Gaulle", "Zürich"];

export default function Example() {
  // Shown as after a submit with no airport; it leaves as soon as one is chosen.
  const [airport, setAirport] = useState<string | null>(null);
  return (
    <Field className="w-full max-w-xs">
      <FieldLabel>Arrival airport</FieldLabel>
      <Combobox items={airports} value={airport} onValueChange={setAirport}>
        <ComboboxInput placeholder="Search airports" />
        <ComboboxContent>
          <ComboboxEmpty>No airport matches.</ComboboxEmpty>
          <ComboboxList>
            {(airport: string) => (
              <ComboboxItem key={airport} value={airport}>
                {airport}
              </ComboboxItem>
            )}
          </ComboboxList>
        </ComboboxContent>
      </Combobox>
      {airport === null && <FieldError>Choose the airport you land at, so the host can plan the pickup.</FieldError>}
    </Field>
  );
}
```

### State precedence
- Loading and no match: loading wins. While a search is on its way the host passes no Empty sentence and the old rows stay, so "No results" never flashes before the answer (`trap/select-async`).
- Loading and open: both show. The rows dim after 250ms and the highlight still moves.
- Highlighted and selected option: both show. The highlighted option takes the grey fill and the picked one keeps its check, so only one option is ever filled.
- Disabled and open: disabled wins. The list does not open.
- Disabled and invalid: disabled wins. The wash fades with the field, and the host drops the error.
- Open and invalid: both show. The wash stays on the field under the list.
- Focus-visible and open: both show. Focus stays in the input, so the ring stays while the list is open.
- Empty field and filled: Not applicable: the field holds a value or it does not.

### Motion
| Trigger | Kind | Preset | Properties | Reduced motion |
|---|---|---|---|---|
| closed to open | announce | `popup-motion`, `--t-pop` on `--curve`, a fade in place 4px below the field | opacity | the fade stays; nothing moves |
| open to closed | announce | `popup-motion` at 70 percent of `--t-pop` | opacity | the same |
| Clear appearing and leaving | announce | `duration-press` | opacity | the same |
| rows dimming while busy | announce | `duration-fade` | opacity | the same |
| Tab ring arriving | input | `duration-press` | box-shadow | the ring appears at once |
| closed to open below 640px | announce | the sheet rises from the bottom edge on `--t-sheet` and `--curve-sheet` over the scrim, and leaves on `--t-leave`, a Sheet's motion; it keeps its 85svh height while the results narrow; a swipe it follows, and a release past 30 percent leaves from where the finger let go | translate, transform | a fade on `--t-fade` |

## Props

<!-- Props generated from registry/cobalt/ui/combobox.tsx with TypeScript by scripts/props-table.mjs -->
### Combobox

| Prop | Type | Default | Purpose |
|---|---|---|---|
| `phone?` | `"popover" \| "sheet"` | `"sheet"` | Below 640px: "sheet", a sheet with the search at its top (the default), or "popover", the list below the field. |

Also accepts from Base UI: `actionsRef`, `autoComplete`, `autoHighlight`, `defaultInputValue`, `defaultOpen`, `defaultValue`, `disabled`, `filter`, `filteredItems`, `form`, `grid`, `highlightItemOnHover`, `id`, `inline`, `inputRef`, `inputValue`, `isItemEqualToValue`, `itemToStringLabel`, `itemToStringValue`, `items`, `limit`, `locale`, `loopFocus`, `modal`, `multiple`, `name`, `onInputValueChange`, `onItemHighlighted`, `onOpenChange`, `onOpenChangeComplete`, `onValueChange`, `open`, `openOnInputClick`, `readOnly`, `required`, `value`, `virtualized`.

### ComboboxChip

| Prop | Type | Default | Purpose |
|---|---|---|---|
| `removeLabel` | `string` |  | The remove button's accessible name, such as "Remove Lisbon". |

Also accepts every native `<div>` attribute; from Base UI: `render`.

### ComboboxChips

| Prop | Type | Default | Purpose |
|---|---|---|---|
| `placeholder?` | `string` |  | On a phone, what the field's button says while nothing is picked. |

Also accepts every native `<div>` attribute; from Base UI: `render`.

### ComboboxChipsInput

No props of its own.

Also accepts every native `<input>` attribute; from Base UI: `disabled`, `render`.

### ComboboxCollection

No props of its own.

### ComboboxContent

| Prop | Type | Default | Purpose |
|---|---|---|---|
| `closeLabel?` | `string` | `"Close"` | On a phone, the name of the sheet's close button. |

Also accepts every native `<div>` attribute; from Base UI: `align`, `alignOffset`, `anchor`, `collisionPadding`, `finalFocus`, `initialFocus`, `render`, `side`, `sideOffset`.

### ComboboxEmpty

No props of its own.

Also accepts every native `<div>` attribute; from Base UI: `render`.

### ComboboxGroup

No props of its own.

Also accepts every native `<div>` attribute; from Base UI: `items`, `render`.

### ComboboxGroupLabel

No props of its own.

Also accepts every native `<div>` attribute; from Base UI: `render`.

### ComboboxInput

| Prop | Type | Default | Purpose |
|---|---|---|---|
| `clearLabel?` | `string` | `"Clear"` | The Clear button's accessible name. |
| `icon?` | `ReactNode` |  | A glyph before the text, such as a search glyph. |
| `showClear?` | `boolean` | `true` | The button that empties the field once it holds a value. |
| `showTrigger?` | `boolean` | `true` | The chevron at the end that opens the full list. |
| `triggerLabel?` | `string` | `"Show options"` | The chevron's accessible name. |

Also accepts every native `<input>` attribute; from Base UI: `disabled`, `render`.

### ComboboxItem

No props of its own.

Also accepts every native `<div>` attribute; from Base UI: `disabled`, `index`, `nativeButton`, `onClick`, `render`, `value`.

### ComboboxList

| Prop | Type | Default | Purpose |
|---|---|---|---|
| `busy?` | `boolean` | `false` | True while a slower search runs; pass `useSlowWait(pending)`, never the raw pending flag. |

Also accepts every native `<div>` attribute; from Base UI: `render`.

### ComboboxStatus

| Prop | Type | Default | Purpose |
|---|---|---|---|
| `busy?` | `boolean` | `false` | Shows the spinning glyph before the words while a search runs. |

Also accepts every native `<div>` attribute; from Base UI: `render`.

### ComboboxValue

No props of its own.

Also accepts from Base UI: `placeholder`.

`Combobox` takes `phone`: `sheet` (the default) turns the field below 640px into a button in the field's look that names the value, labelled by the `Field`, and opens a sheet 85svh tall with the grabber, the field, as `ComboboxInput` or `ComboboxChips` describe it, at its top above the phone's keyboard and focused as the sheet opens, the results under it, and a close button (`closeLabel` on `ComboboxContent`); a swipe down closes it as the close button does. The root keeps an `actionsRef` of its own for the close button and the swipe, and uses the one you pass when you pass one; it never switches `open` between controlled and uncontrolled as the width crosses 640px; `ComboboxChips` takes `placeholder` for that button while nothing is picked. `popover` keeps the field on the page and the list below it. A `ref` on `ComboboxChips` reaches the visible box, so an `anchor` built from it opens the list under the field. Notes only; gen-docs writes the table.
- `showTrigger` and `showClear` on `ComboboxInput` default to true; a search field sets `showTrigger={false}`.
- `icon` on `ComboboxInput`: a leading glyph, such as the search glyph.
- `clearLabel` and `triggerLabel` on `ComboboxInput`: the buttons' names, "Clear" and "Show options" by default.
- `removeLabel` on `ComboboxChip`: the remove button's name, such as "Remove Lisbon".
- `busy` on `ComboboxList` and `ComboboxStatus`: pass `useSlowWait(pending)`, never the raw pending flag.
- The `anchor` on `ComboboxContent`: the chips field's ref for a multiple combobox, so the list sits under the whole field.
- The root is Base UI's: `items`, `value`, `onValueChange`, `defaultValue`, `multiple`, `filter`, `inputValue`, `onInputValueChange`, `disabled`, `name`.

## Usage

### When to use
- Picking one of more than 10 known values, such as a city, a time zone or an adviser.
- Picking several values from a list, shown as chips, such as strategies or regions.
- Picking from results a server finds as you type.

### When not to use
- Up to 10 options that need no typing. Use Select instead.
- Two to six choices that each need their words in view. Use RadioGroup instead.
- Free text with suggestions, where any text is a valid answer. Use Input instead.
- Jumping to a record or running a command from anywhere in the app. Use CommandPalette instead.

### Rules
- Follows `rule/input-has-a-label`.
- Follows `rule/input-error-is-linked`.
- `rule/combobox-items-prop`: When a `Combobox` renders, pass every option in `items` and render `ComboboxList` with a function child, instead of mapping options inside the list yourself, because Base UI filters `items`, says when nothing matches through `ComboboxEmpty`, and shows the picked value's label in the input from them. Evidence: app 6/6 comboboxes in the examples pass `items` (`docs/system/examples/combobox/default.tsx:26`, `docs/system/examples/combobox/in-field.tsx:13`); principle platform: Base UI's Empty renders only from the filtered `items`. Check: test combobox.test.tsx; review.
  - Don't: `<Combobox><ComboboxList>{cities.map((c) => <ComboboxItem key={c} value={c}>{c}</ComboboxItem>)}</ComboboxList></Combobox>`
  - Do: `<Combobox items={cities}><ComboboxList>{(c: string) => <ComboboxItem key={c} value={c}>{c}</ComboboxItem>}</ComboboxList></Combobox>`
- `rule/combobox-async-waits`: When options come from a server, pass `filter={null}`, keep the last results in `items` while the next request runs, and show `busy` and the "Searching" status only from `useSlowWait(pending)`, instead of clearing the list or showing a spinner at once, because an answer under 250ms then changes nothing on screen and a slower one dims what is there rather than flashing empty. Evidence: measured no status at 120ms and "Searching" at 420ms, `.design-system/evidence/combobox/measure.json`; person D39. Check: review of every combobox fed by a request.
  - Don't: `{pending ? <Spinner /> : <ComboboxList>{...}</ComboboxList>}`
  - Do: `<ComboboxStatus busy={slow}>{slow ? "Searching" : null}</ComboboxStatus><ComboboxList busy={slow}>{...}</ComboboxList>`
- `rule/combobox-value-survives-reload`: When the options reload or the form fails, keep the value in state the reload does not reset, as `value` with `onValueChange`, instead of remounting the `Combobox` with a `key`, because a remount drops the pick and the text typed so far. Evidence: person D1; principle heuristic: user control and freedom, a pick is undone by the person, never by a refetch. Check: review.
  - Don't: `<Combobox key={items.length} items={items}>`
  - Do: `<Combobox items={items} value={city} onValueChange={setCity}>`
- `rule/combobox-multiple-anchor`: When `multiple` is on, wrap the input in `ComboboxChips` with a ref and pass that ref to `ComboboxContent` as `anchor`, instead of anchoring to the input, because the input moves along the line as chips are added and the list would jump with it. Evidence: app 2/2 multiple comboboxes in the examples and the stress page pass the anchor (`docs/system/examples/combobox/multiple.tsx:44`, `docs/system/stress/combobox.tsx:80`); principle heuristic: consistency and standards, a list opens under its field. Check: review.
  - Don't: `<ComboboxContent>` under a `ComboboxChips` with no anchor
  - Do: `<ComboboxChips ref={anchor}>...</ComboboxChips><ComboboxContent anchor={anchor}>`

### Content
- Follows `rule/writing-field-label-noun`.
- `rule/combobox-empty-says-what-to-try`: When `ComboboxEmpty` has text, write one sentence that says nothing matched and what to try, such as "No city matches. Check the spelling, or try the country.", instead of "No results" alone, because the sentence is read aloud as it appears and is the only answer the list gives. Evidence: app 5/5 Empty sentences in the examples name the object (`docs/system/examples/combobox/default.tsx:29`, `docs/system/examples/combobox/in-field.tsx:16`); principle heuristic: help users recognise, diagnose, and recover. Check: review.
  - Don't: `<ComboboxEmpty>No results</ComboboxEmpty>`
  - Do: `<ComboboxEmpty>No city matches. Check the spelling, or try the country.</ComboboxEmpty>`
- `rule/combobox-placeholder-search-a-noun`: When the input has a placeholder, write "Search {plural noun}", such as "Search 60 cities" or "Search time zones", instead of "Select..." or "Type here", because the placeholder says what typing does. Evidence: app 5/6 placeholders in the examples read "Search" and the noun (`docs/system/examples/combobox/default.tsx:27`, `docs/system/examples/combobox/state-invalid.tsx:16`); principle heuristic: match between system and the real world. Check: review.
  - Don't: `<ComboboxInput placeholder="Select..." />`
  - Do: `<ComboboxInput placeholder="Search time zones" />`

### Anti-slop
- `rule/combobox-no-chevron-of-your-own`: When composing `ComboboxInput`, pass no `ChevronDownIcon` or `XIcon` button of your own, and set `showTrigger={false}` for a search field instead, because the input draws its own chevron and Clear 4px from the box's end and a second one doubles them. Evidence: app 6/6 inputs in the examples pass no glyph button (`docs/system/examples/combobox/default.tsx:27`, `docs/system/examples/combobox/async.tsx:70`); measured the 28px button 4px from the box's end, `.design-system/evidence/input-group/measure.json`. Check: review.
  - Don't: `<ComboboxInput /><ChevronDownIcon className="size-4" />`
  - Do: `<ComboboxInput />`
- `rule/combobox-not-input-plus-list`: When a field picks from a list by typing, use `Combobox` instead of an `Input` over a hand-built `ul` with `onKeyDown`, because the hand-built list has no `aria-activedescendant`, no Escape and no announced empty state. Evidence: app 4/4 hand-built pickers in the source apps lacked one of the three (`docs/research/2026-10-17-coverage.md`, row 4); principle platform: the ARIA combobox pattern. Check: review.
  - Don't: `<Input value={q} onKeyDown={move} /><ul>{matches.map(...)}</ul>`
  - Do: `<Combobox items={cities}><ComboboxInput /><ComboboxContent>...</ComboboxContent></Combobox>`

### Limits
- `rule/combobox-options-in-view`: When a list holds more than 8 options, expect typing to be the way in and keep the label of each option under 60 characters, because the 320px list shows 8 options of 38px at once and a longer label wraps to a second line, halving what fits. Evidence: measured 8 options in view at 390x844, `.design-system/evidence/combobox/measure.json`. Check: probe /stress/combobox?data=huge.
  - Don't: `<ComboboxItem>Vereinigtes Königreich Großbritannien und Nordirland (Hauptsitz), London office</ComboboxItem>`
  - Do: `<ComboboxItem>United Kingdom</ComboboxItem>`
- `rule/combobox-max-items`: When the list would hold more than 1,000 options, filter on the server with `filter={null}` and send at most 50 at a time instead, because every option is a DOM row and the 200-option stress list already renders all 200 into the popup. Evidence: measured 200 rows rendered for 200 options, `.design-system/evidence/combobox/measure.json`. Check: probe /stress/combobox?data=huge.
  - Don't: `<Combobox items={allTenThousandAdvisers}>`
  - Do: `<Combobox items={results} filter={null} inputValue={query} onInputValueChange={setQuery}>`

## Accessibility
Rests on Base UI `Combobox`: an `<input role="combobox">` with `aria-activedescendant`, a `listbox` of `option`s in a portal, `status` live regions for Empty and Status, and a hidden input for the form. Focus never leaves the input while the list is open.

### Keyboard
| Key | Where focus is | Effect | Focus after | Checked by |
|---|---|---|---|---|
| Tab | before the field | focuses the input; the box draws its ring | the input | screenshot |
| typing | the input | filters the list and opens it | the input | by hand |
| ArrowDown or ArrowUp | the input | opens the list, then moves the highlight | the input, with `aria-activedescendant` on the option | by hand |
| Enter | the input, an option highlighted | picks it and closes the list; in `multiple` it adds a chip and stays open | the input | by hand |
| Escape | the input, list open | closes the list, keeping the value | the input | by hand |
| Backspace | an empty input in `multiple` | removes the last chip | the input | by hand |
| ArrowLeft | the start of the input in `multiple` | moves onto the last chip; Backspace or Delete removes it | that chip, then the input | by hand |
| Tab | the input | leaves the field; Clear and the chevron are not tab stops | the next control | by hand |

### ARIA
| Part | Role | Accessible name from | States and properties | Announced | Checked by |
|---|---|---|---|---|---|
| input | combobox | the `FieldLabel`, a `<label htmlFor>`, or `aria-label` | `aria-expanded`, `aria-controls`, `aria-activedescendant`, `aria-autocomplete="list"`, `aria-invalid`, `aria-describedby` | the name, "combo box", the value, expanded or collapsed | test |
| list | listbox | the input, wired by Base UI | `aria-busy` while `busy` | the number of options on open | by hand |
| option | option | its text | `aria-selected`, `aria-disabled` | the text and "selected" on the picked one | by hand |
| Empty | status, `aria-live="polite"` | none | `aria-atomic` | the sentence, once, as nothing matches | by hand |
| Status | status, `aria-live="polite"` | none | none | "Searching", once, past 250ms | by hand |
| Clear | button, out of the tab order | `clearLabel` | none | the name | test |
| chevron | button, out of the tab order | `triggerLabel` | `aria-expanded` | the name | test |
| chip remove | button, out of the tab order | `removeLabel` | none | the name | test |

## Tokens
| Part | State | Token |
|---|---|---|
| field | all | `--control`, `--r-lg`, `--input` at 50 percent |
| field | focus-visible | `--primary` 1px inset and 3px at 20 percent |
| field | invalid | `--destructive` at 10 percent |
| Clear, chevron | rest, hover | `--muted-foreground`; `--muted` under the pointer; `--r-sm`, 28px |
| popup | open | `--popover`, `--popover-foreground`, `--r-3xl`, `--shadow-floating`, `--t-pop`, `--curve`, `--anchor-width` and `--available-height` from Base UI |
| option | rest | 38px, `--r-lg` |
| option | highlighted | `--accent`, `--accent-foreground` |
| option | selected | `--primary-ink` on the check |
| Empty, Status, group label | all | `--muted-foreground` |
| list | busy | opacity 55 percent, `--t-fade` |
| chip | all | `--card`, `--muted` in dark, `--r-sm`, 28px |

Measured at 390x844 (`.design-system/evidence/combobox/measure.json`): the list 4px below the field at its start edge, a 16px popup corner, 6px list padding, options 38px with a 10px corner (remeasured 2026-10-17 after the popup corner change, `.design-system/evidence/popover/corners-2026-10-17.json`), the chips field 36px with 28px chips.

## Related
- Select: up to 10 options with no typing.
- RadioGroup: two to six choices with their words in view.
- Input: the field's box the combobox is drawn with, from InputGroup.
- CommandPalette: a search over the whole app.
- Field: the label, description and error around it.
- ChipRow: narrows a list to one of many choices as a row of links.
- FilterBar: filter pills over a list, each naming what is chosen, that fold into one sheet on a phone.
- InviteField: email addresses typed or pasted as chips, with a role, to invite people.
