vigneshksaithal / bootstrap-autocomplete

A autocomplete plugin for bootstrap...

Home Page:https://vigneshksaithal.github.io/bootstrap-autocomplete/demo.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bootstrap-autocomplete

See DEMO

Features

  • 1.8kb minified
  • Pure Vanilla JavaScript
  • Only bootstrap CSS Required

Installation

Fork this project and use it in your website. Fork It

[OR]

You can also use this by adding the below code to your website[For testing/demo purposes].

<script src="https://cdn.jsdelivr.net/gh/vigneshksaithal/bootstrap-autocomplete@1.2/src/index.min.js"></script>

Usage

STEP 0: Add bootstrap CSS.

STEP 1: Add javascript to your web app.

<script src="/bootstrap-autocomplete.min.js"></script>

[OR]

Directly add jsDelivr CDN provided below.

<script src="https://cdn.jsdelivr.net/gh/vigneshksaithal/bootstrap-autocomplete@main/src/index.min.js"></script>

STEP 2: Add HTML code. Give the component div id="autocomplete".

<div id="autocomplete">
  <input id="search" type="text" class="form-contorol"/>
</div>

STEP 3: Initiate the autocomplete function. Pass the search(input) element and the array of values.

<script>
  var arr = ['apple', 'mango', 'grapes'];
  var search = document.getElementById('search');
  autocomplete(search, arr);
</script>

Contributions

If you find any bugs or have any feature requests then just raise a issue. Thanks You🙏

About

A autocomplete plugin for bootstrap...

https://vigneshksaithal.github.io/bootstrap-autocomplete/demo.html

License:MIT License


Languages

Language:JavaScript 99.9%Language:HTML 0.1%