Home > Form Elements > Tiny JavaScript Plugin For Amazon Autocompletion
Tiny JavaScript Plugin For Amazon Autocompletion

Tiny JavaScript Plugin For Amazon Autocompletion

AmazonAutocomplete is a vanilla JavaScript plugin to unlock the full power of the Amazon autocompletion engine right into your search input.

BASIC USAGE

Install the library via NPM

npm install amazon-autocomplete

Add it to your html file before the body tag.

<script type=“text/javascript” src=“/path/to/scripts/amazon-autocomplete.min.js”></script> 

Create a text input in your html file for the search field.

<input type=“text” id=“search-input”/> 

Edit your main JavaScript file to create a new AmazonAutocomplete instance with your search field CSS selector.

let searchInput = new AmazonAutocomplete("#search-input");

Now you got a search field on steroids. Go ahead and apply some styles to make it shine.

  Website Demo

About admin