Skip to content

Browse components

← All components

Combo Box

Filterable combo box — type to search, pick from a list.

Install
npx shadcn@latest add https://ui.anuragroy.dev/r/combo-box.json

Preview

Loading preview…

Installation

Add the component from this site. The shadcn CLI fetches the registry JSON over HTTPS — no named registry submission required.

Terminal
npx shadcn@latest add https://ui.anuragroy.dev/r/combo-box.json

GitHub fallback if the website is down:

Terminal
npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/combo-box.json

Usage

Import paths follow your components.json aliases. After install, the default path is @/components/ui/combo-box.

Import
import {  ComboBox,  ComboBoxContent,  ComboBoxEmpty,  ComboBoxInput,  ComboBoxInputGroup,  ComboBoxItem,  ComboBoxLabel,  ComboBoxList,  ComboBoxTrigger} from "@/components/ui/combo-box"
example.tsx
import {  ComboBox,  ComboBoxContent,  ComboBoxEmpty,  ComboBoxInput,  ComboBoxInputGroup,  ComboBoxItem,  ComboBoxLabel,  ComboBoxList,  ComboBoxTrigger,} from "@/components/ui/combo-box"const items = ["Next.js", "Remix", "Astro"]export function Example() {  return (    <ComboBox items={items}>      <ComboBoxLabel>Framework</ComboBoxLabel>      <ComboBoxInputGroup>        <ComboBoxInput placeholder="Select…" />        <ComboBoxTrigger />      </ComboBoxInputGroup>      <ComboBoxContent>        <ComboBoxEmpty>No frameworks</ComboBoxEmpty>        <ComboBoxList>          {(item: string) => (            <ComboBoxItem key={item} value={item}>              {item}            </ComboBoxItem>          )}        </ComboBoxList>      </ComboBoxContent>    </ComboBox>  )}

API Reference

ComboBox

Base UI Combobox root. `items` can be strings or objects.

PropTypeDefault
itemsreadonly Item[]—
onValueChange(value) => void—

Notes

  • Chip and multi-select helpers (`ComboBoxChips`, `ComboBoxChip`) are also exported.