Skip to content

TheOmer77/downshift-shadcn-combobox

Repository files navigation

Shadcn/ui + Downshift Combobox

An autocomplete input and command palette with a list of suggestions. Built with shadcn/ui and Downshift's useCombobox hook.

Install in your app

Install using the shadcn CLI:

pnpm dlx shadcn@latest add https://downshift-shadcn-combobox.vercel.app/r/downshift-combobox.json

Usage

<Combobox>
  <ComboboxInput placeholder='Pick an item...' />
  <ComboboxContent>
    <ComboboxItem label='One' value='one' />
    <ComboboxItem label='Two' value='two' />
    <ComboboxItem label='Three' value='three' />
    <ComboboxEmpty>No results.</ComboboxEmpty>
  </ComboboxContent>
</Combobox>

For a more advanced example, check the demo app code.

Running the demo app

To run the development server:

pnpm dev