Combobox

An input with a filterable list of suggestions, including multi-select chips.

Installation

  1. Add the registryOnce per project
  2. Add combobox

Usage

Pass the options as items and render each one inside ComboboxList. ComboboxEmpty shows when nothing matches. Label the input with aria-label or a FieldLabel.

For a short list that doesn't need filtering, use a Select. When people may type a value that isn't an option, use an Autocomplete.

Composition

Examples

Groups

Pass groups as items, each with its own items, and render them with ComboboxGroup and ComboboxCollection.

Search in the popup

Use a ComboboxTrigger and put the ComboboxInput inside the popup. For object items, itemToStringLabel returns the text to search.

Multiple

Set multiple to show the values as chips in ComboboxChips. Pass the ref from useComboboxAnchor to ComboboxContent as anchor so the popup lines up with the chips.

Props

ComboboxInput is an Input Group with open and clear buttons. ComboboxContent takes side, sideOffset, align, alignOffset and anchor.

The tables leave out className, style and render. Parts built on Base UI take them as its styling and composition guides describe.

Combobox

ComboboxValue

ComboboxTrigger

ComboboxInput

ComboboxContent

ComboboxList

ComboboxItem

ComboboxGroup

ComboboxCollection

ComboboxSeparator

ComboboxChip

ComboboxChipsInput