---
title: "Combobox"
description: "An input with a filterable list of options, for single or multiple selection with chips, groups, and empty states. Built on Base UI."
plan: Free
docs: https://ui.edbn.me/docs/components/combobox
---

# Combobox

An input with a filterable list of options, for single or multiple selection with chips, groups, and empty states. Built on Base UI.

## Installation

```bash
npx shadcn@4.19.0 add https://ui.edbn.me/r/combobox.json
```

## Dependencies
- npm: @base-ui/react@^1.8.0, lucide-react@^1.33.0
- edbn: edbn-base, button, input-group

## Usage

```tsx examples/combobox-basic.tsx
"use client";
import {
  Combobox,
  ComboboxContent,
  ComboboxEmpty,
  ComboboxInput,
  ComboboxItem,
  ComboboxList,
} from "@/components/ui/combobox";

const fruits = ["Apple", "Banana", "Blueberry", "Grapes", "Pineapple"];

export default function ComboboxBasicPreview() {
  return (
    <div className="w-64 space-y-2">
      <label id="fruit-label" htmlFor="fruit" className="text-[15px]">
        Fruit
      </label>
      <Combobox items={fruits}>
        <ComboboxInput
          id="fruit"
          aria-labelledby="fruit-label"
          placeholder="Choose a fruit"
          className="w-full"
        />
        <ComboboxContent>
          <ComboboxEmpty>No fruit found.</ComboboxEmpty>
          <ComboboxList aria-label="Fruits">
            {(fruit: string) => (
              <ComboboxItem key={fruit} value={fruit}>
                {fruit}
              </ComboboxItem>
            )}
          </ComboboxList>
        </ComboboxContent>
      </Combobox>
    </div>
  );
}
```

## Files
- components/ui/combobox.tsx (318 lines)

## For agents
- Base theme, once per project: npx shadcn@4.19.0 add https://ui.edbn.me/r/edbn-base.json
- MCP server with search, items, examples and source: https://ui.edbn.me/mcp
- Every page and item: https://ui.edbn.me/llms.txt
