Commit Combobox

Commit Combobox is a copy-paste React component that stops typed text saved instead of a pick before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/commit-combobox
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 3 extra npm packages
  • A11y guidance in docs

StopsTyped text saved instead of a pick

Was this component page useful?

How do I install Commit Combobox?

pnpm dlx shadcn@latest add @bollard/commit-combobox

The files land in your project. They're yours to edit.

How do I use Commit Combobox in React?

commit-combobox-usage.tsx
import { CommitCombobox, type ComboOption } from "@/components/ui/commit-combobox"

<CommitCombobox label="Delivery city" options={CITIES} defaultInputValue="Banglore" />

What input mistakes does Commit Combobox catch?

  • Typed text left without a pick when leaving the field
  • Misspellings, with a one-tap Did you mean
  • Two options with the same name, by asking which
  • A pick silently replaced by later typing

What props does Commit Combobox accept?

CommitCombobox props
PropTypeDefault
label* (required)

Visible label.

string—
options

The options to pick from. Ignored when `loadOptions` is set.

readonly ComboOption[][]
loadOptions

Fetches options for a query (debounced, aborted and ignored once stale).

(query: string, signal: AbortSignal) => Promise<ComboOption[]>—
value

Controlled pick: the option, or null when nothing is picked.

ComboOption | null—
defaultValue

Initial pick when uncontrolled.

ComboOption | nullnull
onValueChange

Called with the picked option, or null when the pick is dropped.

(option: ComboOption | null) => void—
defaultInputValue

Unpicked text to start with (a restored draft). It is checked as if the user had just left the field.

string—
messages

Override any text (see `COMMIT_COMBOBOX_MESSAGES`).

Partial<CommitComboboxMessages>—

* required. Also accepts the native props of <input> (className, aria-*, data-*…), passed through to it.

How is Commit Combobox accessible?

  • role="combobox" with aria-autocomplete="list", aria-expanded, aria-controls and aria-activedescendant
  • Arrow keys move through options, Enter picks, Escape closes or undoes
  • Visible <label> tied to the input
  • Motion respects prefers-reduced-motion

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

  • Fuzzy matching is for suggestions only; it never picks a near match on its own
  • With loadOptions, matching only covers the options returned

What expensive mistakes does Commit Combobox stop?

Typed text saved instead of a pick

Also known as

combobox · autocomplete · typeahead · select · searchable dropdown · city picker · react select · cmdk

Field type

What dependencies does Commit Combobox require?

Commit Combobox facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameCommit Combobox
Registry identifier@bollard/commit-combobox
Install commandnpx shadcn@latest add @bollard/commit-combobox
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react, @floating-ui/react, motion
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Commit Combobox

What form validation mistake does Commit Combobox catch?

Commit Combobox prevents typed text saved instead of a pick. A pick-from-list field that never saves text the user only typed, and visibly drops a pick when it is typed over. Catches: Typed text left without a pick when leaving the field, Misspellings, with a one-tap Did you mean, Two options with the same name, by asking which, A pick silently replaced by later typing. Limitation: validate commit-combobox schemas on backend.

How do I install commit-combobox with shadcn?

Run `npx shadcn@latest add @bollard/commit-combobox`. Sources added: registry/default/commit-combobox/commit-combobox.tsx, registry/default/commit-combobox/match.ts. Package requirements: lucide-react, @floating-ui/react, motion.

What props customize Commit Combobox?

Commit Combobox accepts `label`, `options`, `loadOptions`, `value`, `defaultValue`. Configures combobox, autocomplete, typeahead behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of commit-combobox?

Fuzzy matching is for suggestions only; it never picks a near match on its own. With loadOptions, matching only covers the options returned Server requirement: backend verification for commit-combobox.

How does Commit Combobox meet accessibility guidelines?

role="combobox" with aria-autocomplete="list", aria-expanded, aria-controls and aria-activedescendant. Arrow keys move through options, Enter picks, Escape closes or undoes. Visible <label> tied to the input. Motion respects prefers-reduced-motion. Minimizes errors: combobox free text saved, autocomplete not selected.

Which components pair with Commit Combobox?