Simple autocomplete pure vanilla Javascript library – autoComplete.js

autoComplete.js is a simple pure vanilla Javascript library that’s progressively designed for speed, high versatility and seamless integration with wide range of projects & systems, made for users and developers in mind. It is dynamic, blazing fast, dependency-free, and easy-to-use autocomplete & typeahead JavaScript library for modern web development.
Simple autocomplete pure vanilla Javascript library - autoComplete.js

  • Simple & Easy to use
  • Pure Vanilla Javascript
  • Zero Dependencies
  • Lightweight
  • Lightning Fast
  • Versatile
  • Customizable
  • First Class Error Handling & Reporting


Load thr js and css library on page.

link rel="stylesheet" href="[email protected]/dist/css/autoComplete.min.css"/>
<script src="[email protected]/dist/js/autoComplete.min.js"></script>


Assign id=”autoComplete” to the input filed

<input id="autoComplete" type="text">


Create new instance of autoComplete engine

new autoComplete({
    dataSrc: grocery,            
    searchEngine: "strict",      
    threshold: 0,                
    renderResults: {             // Results Destination & position
        destination: document.querySelector("#autoComplete"),
        position: "afterend"
    placeHolder: "Try me...",    
    maxResults: 10,              
    highlight: true,             
    dataAttribute: {
        tag: "set",              
        value: "value"           
    onSelection: value => {      
        document.querySelector(".selection").innerHTML =;

See live demo and download source code.


This awesome plugin is developed by TarekRaafat. Visit their official github repository for more information and follow for future updates.