Skip to content

Early previewhamur is not on npm yet. The components are being built in the open, follow along on GitHub.

UIComponentsReact

Combobox

An input that filters a list as the reader types and picks from it.

Built on the headless Combobox.See its API in Docs

Rendered by React 19.3.1

combobox.tsx

Installation

npx shadcn@4.23.0 add https://hamur.dev/r/react/combobox.json

It also adds utils, button, input-group. The app needs its setup first: Installation.

Usage

Pass the items to Combobox; ComboboxInput filters, ComboboxContent holds ComboboxList with a ComboboxItem per item and ComboboxEmpty for no match. ComboboxChips turns it into a multiple choice. Filtering and keyboard are the headless Combobox's.

import {
  Combobox,
  ComboboxInput,
  ComboboxContent,
  ComboboxList,
  ComboboxItem,
  ComboboxGroup,
  ComboboxLabel,
  ComboboxCollection,
  ComboboxEmpty,
  ComboboxSeparator,
  ComboboxChips,
  ComboboxChip,
  ComboboxChipsInput,
  ComboboxTrigger,
  ComboboxValue,
} from '@/components/ui/combobox'

Examples

API reference

The styled parts pass every prop to the headless part they wrap and add classes. The props, data attributes and keyboard are on Combobox's API reference.