Primitives

Combobox (searchable select)

For lists past ~8 items. Searches label, hint and keywords in either script: try “dha”, “ঢাকা” or “div”.

Import#

Everything comes from the package root. The example above uses:

your-component.tsx
import { Combobox, Label } from "@waveinno/ui";

Props#

Read from the source of this version, so they match the code exactly.

<Combobox>

src/components/ui/combobox.tsx
PropTypeDefaultDescription
idstring—
valuerequiredstring | null—
onChangerequired(value: string | null) => void—
optionsrequiredComboOption[]—
placeholderstring—
searchPlaceholderstring—
clearablebooleanfalse
disabledboolean—
classNamestring—
contentClassNamestring—
hintInValueboolean | ((o: ComboOption) => string)falseShow the selected option's hint in the closed box too (e.g. a zone's offset).
labelsPartial<ComboboxLabels>—
aria-invalidboolean—

<Label>

src/components/ui/label.tsx
PropTypeDefaultDescription
requiredboolean—

Also takes ComponentPropsWithoutRef<typeof LabelPrimitive.Root>.

Install#

If the project does not have the package yet, add it, then follow the setup for Next.js or Vite once.

$ npm install @waveinno/ui