single-image

AMP HTML Now Supports Autocomplete for Faster Search Experiences

AMP pages can now more closely mirror the behavior of regular HTML pages with autocomplete for search and forms.

An autocomplete-enabled input field suggests completed results corresponding to what the user is typing.

As you likely know from this being a common feature in regular pages, it can greatly speed up the time it takes to complete a task.

AMP-autocomplete can be used to power on-site search experiences, or in forms to help ensure inputs yield more predictable results.

When a user types into an input field with amp-autocomplete, relevant suggestions will automatically appear below the input field.

This feature can also be used to generate a list of suggestions for a particular input field.

For example, a search bar on an e-commerce site can automatically suggest the most popular products with amp-autocomplete.

Data can either be fetched from a JSON endpoint or locally from amp-state.

For more on the technicalities of how this feature works and how to set it up, see the official documentation here.

Leave a Comment

Your email address will not be published.

You may like