The amp-autocomplete suggests complete results according to the input given by the user as they type. It is a very common and helpful feature as it enables users to complete there task more quickly. This is extremely useful when the user does not know the full range of the input.
Required Scripts: Import the amp-autocomplete component –
Import the amp-form component –
- amp-autocomplete must be nested in a form.
- The form should contain an input field with an input tag or textarea tag.
- A datasource must be a JSON object containing an array property item.
- A datasource can be specified with a child script type=”application/json” tag or specified via src tag.
Using child script type=”application/json” –
Using src tag –
- Google Amp amp-ad
- Google AMP amp-accordion
- How to create Nested Accordion using Google AMP amp-accordion?
- How to create Hidden Header using Google AMP amp-accordion?
- How to create Dynamic Header using Google AMP amp-accordion?
- Google AMP amp-facebook-like
- Google AMP amp-carousel
- Google AMP amp-date-countdown
- Google AMP amp-brightcove
- Google AMP amp-bind-recaptcha
- How to disable download option in amp-audio in Google AMP ?
- How to set custom media notification with amp-audio in Google AMP ?
- How to set an image placeholder for amp-anim in Google AMP ?
- How to set audio loop in amp-audio of Google AMP ?
- Google AMP amp-img
- Google AMP amp-image-lightbox
- Google AMP amp-lightbox-gallery
- How to calculate area of circle dynamically using amp-bind-macro in Google AMP ?
- What is Initialize state in amp-bind of Google AMP ?
- How to change/update image size dynamically using amp-bind in Google AMP ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.