Hextech UI

Combobox

Live example

Combobox

Installation

Terminal
npx shadcn@latest add https://hextech-ui.vercel.app/r/combobox.json

API reference

These are the main Combobox options. See the exported TypeScript types for inherited native or primitive props.

PropTypeDefault
labelstring (required)—
optionsreadonly T[]required
getOptionKey(option: T) => string | numberstring/id/value
itemToStringLabel(option: T) => stringstring/label
renderOption / isOptionDisabledrow renderer / disabled predicate—
value / defaultValueT | null—
clearOnEscapeboolean; closed Escape clears only when enabledfalse
sizesmall | medium | largemedium

Controlled object selection

Keep the selected record in React state. Provide stable keys and a readable string label when options are objects; do not use the object index as its identity. Use defaultValue when the component should own selection.

Live example

Controlled object selection

Owner ID: avery