Search documentation

Search components and pages

Combobox

Autocomplete input with a list of suggestions.

01

Installation

Add the combobox component with the shadcn CLI.

bash
npx shadcn@latest add https://swiss.ui.unsanity.ai/r/combobox.json
02

Usage

tsx
import { Combobox } from "@/components/ui/combobox"
03

Examples

Default

import { Combobox } from "@/components/ui/combobox"

const fruits = [
  { value: "apple", label: "Apple" },
  { value: "banana", label: "Banana" },
]

<Combobox options={fruits} placeholder="Select fruit..." />