Command Palette

Search for a command to run...

Combobox

An autocomplete input with a filterable dropdown list. Built on Base UI Combobox primitive.

Installation

npx shadcn add combobox --registry https://ui.ch.sh/r

Usage

import {
  Combobox,
  ComboboxInput,
  ComboboxContent,
  ComboboxList,
  ComboboxItem,
  ComboboxEmpty,
} from "@/components/ui/combobox"

export default function Example() {
  return (
    <Combobox>
      <ComboboxInput placeholder="Search..." />
      <ComboboxContent>
        <ComboboxList>
          <ComboboxEmpty>No results.</ComboboxEmpty>
          <ComboboxItem value="option-1">Option 1</ComboboxItem>
          <ComboboxItem value="option-2">Option 2</ComboboxItem>
        </ComboboxList>
      </ComboboxContent>
    </Combobox>
  )
}