Combobox

Shadcn style combobox: a popover select with a filter input, check mark on the chosen item and an empty message. Built on Base UI popover for React.

src/registry/ui/combobox.tsx/r/combobox.json

Installation#

bash
npx shadcn@latest add @minidev/combobox

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/combobox.json

Usage#

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

export function Example() {
  return (
    <Combobox items={items} value={c} onChange={setC} />
  )
}

API reference#

Combobox props
PropTypeDefault
itemsItem[]SAMPLE_ITEMS
valuestring-
defaultValuestring-
onChange(value: string) => void-
placeholderstring"Select…"
disabledboolean-
classNamestring-
emptyTextstring"No results"

Dependencies#

npm

lucide-react

Built from

Examples#

All form components

Learn more