Skip to main content

Autocomplete

Add toDiv / container

Role attribute

Every instance of this component carries:

Add this attribute
Namewf-algolia-element
Valueautocomplete

Variants

This component ships in several presets.

Standard

Required1 attribute
IndexRequired

Algolia index for live suggestions.

Accepts e.g. acme_blog_prod

Optional3 attributes
Hits

Maximum suggestions fetched per autocomplete-section (hitsPerPage, default 4). Set on the section that hosts the suggestions.

Accepts min 1, whole numbers

Show on focus

Pre-fetch and show the suggestion section on empty-input focus (before any typing). Set on the autocomplete-section.

Accepts true · falseDefault false

Hide empty

Hide the dropdown when there are no results.

Accepts true · falseDefault true

Federated

Required1 attribute
IndexRequired

Algolia index per autocomplete section.

Accepts e.g. acme_blog_prod

Optional2 attributes
Hits

Maximum suggestions fetched per autocomplete-section (hitsPerPage, default 4). Set on each section, not the wrapper.

Accepts min 1, whole numbers

Show on focus

Pre-fetch and show a section on empty-input focus (before any typing). Set on each autocomplete-section.

Accepts true · falseDefault false

Required1 attribute
IndexRequired

Algolia index for live suggestions.

Accepts e.g. acme_blog_prod

Optional3 attributes
Hits

Maximum suggestions fetched per autocomplete-section (hitsPerPage, default 4). Set on the section that hosts the suggestions.

Accepts min 1, whole numbers

Show on focus

Pre-fetch and show the suggestion section on empty-input focus (before any typing). Set on the autocomplete-section.

Accepts true · falseDefault false

Hide empty

Hide the dropdown when there are no results.

Accepts true · falseDefault true