Did you know?dyk.si

Combobox (Autocomplete)

A text field with a list of suggestions that filters as you type.

Also known as: Autocomplete

role="combobox" + <datalist>

When to use it

For long lists: cities, countries, products.

Common mistake

For five options, a select or radio group is simpler.

Accessibility

Arrow keys move through suggestions, Enter picks, and the result count is announced.

Name in code

HTML/CSSrole="combobox" + <datalist>
React<Command> / <Combobox>
Jetpack ComposeExposedDropdownMenuBox
SwiftUI.searchable + .searchSuggestions

Ready prompt for your coding agent

Add a Combobox (Autocomplete) to this screen. What it is: A text field with a list of suggestions that filters as you type. Implement with: role="combobox" + <datalist> (HTML/CSS). Accessibility: Arrow keys move through suggestions, Enter picks, and the result count is announced. When to use it: For long lists: cities, countries, products. Avoid: For five options, a select or radio group is simpler. Reuse the project's existing design tokens, spacing and component conventions.

Or compose a whole page from this element and others →

Prompts are in English for the most precise results with coding agents.