Prodular UI

Combobox

A text input that filters a list as you type, for picking one or many items from long lists.

npx prodular-ui add combobox

Single

Type to filter teammates.

Type to filter. The owner gets renewal reminders.

Multiple with chips

Sizes with clear button

Anatomy

<Combobox items={owners}>  <ComboboxInput placeholder="Search teammates" />  <ComboboxContent>    <ComboboxEmpty>No teammate matches that name.</ComboboxEmpty>    <ComboboxList>      {(item) => <ComboboxItem key={item} value={item}>{item}</ComboboxItem>}    </ComboboxList>  </ComboboxContent></Combobox>

Guidance

Use it when

  • Long lists people search by name: teammates, customers, projects, countries.
  • Tagging, where several values can apply. Use chips.

Avoid

  • Short lists of fixed options. Use Select.
  • Free text search with no list. Use Input or InputGroup.

Rules for AI agents

Published in llms-full.txt, the registry and the MCP server, so coding agents follow them when they build with this component.

  • Pass the full list as items and render ComboboxList as a function of each item.
  • Always include ComboboxEmpty with a sentence that says what was not found.
  • For multiple values use ComboboxChips with useComboboxAnchor and pass the anchor to ComboboxContent.
  • Outside a Field, give ComboboxInput or ComboboxChipsInput an aria-label.
  • Use showClear when an empty value is valid.
  • Put a search icon or scope label in ComboboxInput leading instead of absolutely positioning it.

API

Combobox

PropTypeDefaultDescription
itemsT[]The options to filter.
multiplebooleanfalseAllows several values. Pair with ComboboxChips.

ComboboxInput

PropTypeDefaultDescription
size"sm" | "default" | "lg""default"Height. Matches Button and Input.
showTriggerbooleantrueShows the chevron button.
showClearbooleanfalseShows a clear button when there is a value.
leadingReactNodeContent before the text, such as a search icon, in an inline-start addon.

ComboboxContent

PropTypeDefaultDescription
anchorRefObjectPositions the popup against the chips container.

Installation

The Prodular UI CLI adds the source to components/ui with everything it depends on. In a project that already uses shadcn/ui, the shadcn CLI installs it from the Prodular registry too. See Installation for the first setup.

npx prodular-ui add combobox# or, with the registry in components.jsonnpx shadcn@latest add @prodular/combobox