Skip to content

Searchable select (combobox)

A keyboard-filterable dropdown to pick one or several values, shown as chips, backed by a real select field.

  • Tailwind
  • React
  • CSS
  • WordPress
Open in a new tab

Description

Type a few letters to filter the list, ignoring accents; the matching part is highlighted. In multiple mode each value becomes a chip, removed with a click or Backspace; in single mode the field restores the chosen value if you leave without confirming. A native select remains the source of truth: it is what the form submits, and the only thing shown without JavaScript. Accessibility: ARIA 1.2 combobox pattern (aria-expanded, aria-activedescendant, multiselectable listbox), up and down arrows, Enter, Escape, Alt + up arrow; results and additions announced in a live region; AA contrast in light and dark; no animation with prefers-reduced-motion.

Code

Loading the code…

Archive contents

champ-selection-combobox-html-tailwind.zip3 files · 8 Ko

  • index.html43 Ko
  • README.md3 Ko
  • LICENSE.md1 Ko

Tags

Updated on October 16, 2026.

In the same spirit

  • An e-mail field and its button on one line, a GDPR consent checkbox, clear errors, a typo suggestion and a confirmation message.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A short form for tradespeople: type of job, description, postcode, timeframe, optional photos, then a confirmation summary.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • An appointment form: reason, day with the native date picker, morning and afternoon slots as radio buttons, full slots crossed out and a summary of the choice.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component