npm install manhattan-typeahead --save-dev
<label>
Language
<input
name="languages_input"
data-mh-typeahead
data-mh-typeahead--coerce="valueOnly"
data-mh-typeahead--list="C,C++,CoffeeScript,JavaScript,Lua,Moonscript,Perl,Python,Wren"
>
<input type="hidden" name="languages">
</label>
<label>
Tags
<input
name="tags_input"
value=""
data-mh-tokenizer
data-mh-tokenizer--hidden-selector="[name=tags]"
data-mh-tokenizer--sortable
>
<input type="hidden" name="tags">
</label>
import * as $ from 'manhattan-essentials'
import {tokenizer, typeahead} from 'manhattan-typeahead'
const myTypeahead = new typeahead.Typeahead($.one('[data-mh-typeahead]'))
myTypeahead.init()
const myTokenizer = new tokenizer.Tokenizer($.one('[data-mh-tokenizer]'))
myTokenizer.init([{'label': 'Some tag', 'value': 'Some value'}])