Amphtml: I2I: suggest completed values for user inputs with amp-autocomplete

Created on 21 Feb 2019  路  3Comments  路  Source: ampproject/amphtml

Summary

An amp-autocomplete extension will enable publishers to easily provide a set of suggestions completing a user query in an input field.

Design document

Design doc

Motivation

Currently the autosuggest example is the only way AMP supports an autocomplete feature. It was developed in response to high demand from e-commerce and news publishing clients. Developing a dedicated component鈥攚hose performance during load and user interactions is tested and improved upon鈥攑rovides a simple way for publishers to improve their user interactions with an easy-to-use API that requires little overhead.

Goals

  • Provide suggestion functionality on top of a developer inserted input tag.
  • Fulfill two primary use cases: a page wide search field or a specific field lookup (i.e. in a form). These meet a wide range of needs including publishing and e-commerce.
  • Support varying forms of source data and filtering mechanisms in response to user input.
  • Integration with other AMP ecommerce features, e.g. AMP actions and events, amp-bind

Additional context

Helpful autocomplete visual thanks to @andrewwatterson

Caveats

Component data retrieval method pending ongoing discussions about how to integrate with amp-state or if it is better to use a src attribute similar to amp-list now.

/cc @cvializ @gmajoulet @aghassemi

INTENT TO IMPLEMENT

Most helpful comment

Closing since the experiment was cleaned up in #22708 and has fully launched. :)

All 3 comments

autocomplete

Updated visual here ^^^

The link above is out of date.

Closing since the experiment was cleaned up in #22708 and has fully launched. :)

Was this page helpful?
0 / 5 - 0 ratings