OPUS/UI

Navigation

Combobox

Searchable select with ranked matching (prefix > word > substring, keywords too), clear button and an optional “Create …” row.

6 files · 526 locdeps: clsx, tailwind-merge

Type to filter — try “vercel”.

Creatable: type a new label and press Enter.

Installation

With the shadcn CLI, pointing at this platform’s registry:

npx shadcn@latest add https://opusui.131199999.xyz/r/combobox.json

Or offline, straight from your opus55 checkout (copies every file it needs):

node ../tailwind_component/opus55/scripts/add.mjs combobox

Usage

import { Combobox } from "@/components/opus/ui/combobox";

<Combobox options={opts} value={v} onValueChange={setV} onCreate={addOption} />

API

PropTypeDefaultDescription
options{ value, label, description?, icon?, keywords?, disabled? }[]—Choices.
value / onValueChangestring—Selection.
onCreate(text) => void—Enables the create row.
emptyText / placeholderReactNode / string—Copy.

Command palette