Explore related content in the Algolia Academy
Autocomplete
What Autocomplete provides
Autocomplete is a JavaScript library that lets you quickly build autocomplete experiences. All you need to get started is:- A container to inject the experience into
- Data to fill the autocomplete with
container
and getSources
)
you can have an interactive autocomplete experience.
The library creates an input and provides the interactivity and accessibility attributes,
but you’re in full control of the DOM elements to output.
You don’t have to display just suggested search terms,
you can display links for actual results themselves (rather than links to results pages)
or even display “actions” that a user can take from within an autocomplete.
For example, you could let your users turn dark mode on,
directly from an autocomplete, if they begin to type “dark mode”.
You can also display different data types (such as suggested search terms, product results, and actions) differently.
The format of each data type and layout is customizable.
What Autocomplete doesn’t provide
Unlike InstantSearch, Autocomplete doesn’t provide a library of ready-made UI widgets. You’re in control of the full rendering of your autocomplete experience, and the library provides everything you need to make it functional and accessible. You’re also in charge of providing the collection of items to display. You can easily plug Algolia results usinggetAlgoliaResults
if you want, but you’re free to use Autocomplete with any data sources you want.
Ready to learn more? Move on to Getting started to see a basic example in action.