npm install typeaheadtypeahead widget
``javascript
var Typeahead = require('typeahead');
var input = document.createElement('input');
// source is an array of items
var ta = Typeahead(input, {
source: ['foo', 'bar', 'baz']
});
input // =>
`
To get the default style you also have to include style.css.
`javascript
var Typeahead = require('typeahead');
var input = document.createElement('input');
// source is an array of items
var ta = Typeahead(input, {
source: function(query, result) {
result(['foo', 'bar', 'baz']);
}
});
input // =>
`
above`, `below` and `right`. default is `below`$3
> Automatically select first item in drop down menu. Valid values are `true`, `false`. Default is `true``.Custom styling can be applied for the following rules.
The current code is fork of the bootstrap typeahead component and is licensed under Apache License, Version 2.0