- Components
- Forms
Combobox
Base UI Combobox: a pill input with a chevron and optional clear, a Select-style popup with the sliding highlight and a check, single or multiple (chips). Surface-aware.
Installation#
npx shadcn add @ortaui/comboboxExamples#
Single#
Grouped#
Input inside the popup#
Multiple (chips)#
Next.js
Remix
Disabled and invalid#
On a surface#
Astro
API reference#
| Prop | Type | Default | Description |
|---|---|---|---|
| surface | "default" | "raised" | auto | Look on a panel. Unset: raised (page fill + border) inside any [data-surface] container. "raised" forces it anywhere; "default" keeps the muted fill even inside a surface. |
| items | T[] | { value, items }[] | - | Root: items to filter and render (flat or grouped). |
| multiple | boolean | - | Root: several values. Use ComboboxChips, ComboboxChip and ComboboxChipsInput. |
| value / defaultValue / onValueChange | T | T[] | - | Controlled or uncontrolled value (Base UI). |
| showTrigger / showClear | boolean | true / false | ComboboxInput: chevron and clear buttons. |
| anchor | RefObject | - | ComboboxContent: position against the chips field; get the ref from useComboboxAnchor(). |