Skip to main content
  1. Docs
  2. Components
  3. Forms

Combobox

Pick from many by typing to filter: one value, or several as pills. It can ask a server.

Import
@qeetrix/react/experimental
Status
ExperimentalSince 0.0.6
Renders
<input role="combobox">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • Choosing from a list too long to scroll: people, apps, countries.
  • Several from a long list, as pills.
  • A directory searched on the server as you type.
Not for

02

Anatomy

  1. 1field-label<label>Names the input, and its Clear button.
  2. 2combobox-chip<div>A chosen value, with multiple: a pill with its remove button.
  3. 3combobox-input<input>What's typed; the list narrows to the labels that match.

03

Do and don't

Long lists only
DoHundreds of people: type a few letters.
Don'tThree options to type at: a Select shows them.
Values are IDs, labels are names
Dovalue: usr_1; label: Priya Sharma, with her email to tell two Priyas apart.
Don'tA list of bare names that look alike.

04

Content

  • The placeholder is an example: "e.g. Priya Sharma".
  • description tells options apart: an email, a code.
  • Disabled options stay in view when their absence would puzzle.
Next — ComboboxAPI