This repository contains a .less file that provides a Boostrap theme for the jQuery Tokeninput plug-in.
- Copy the
token-input-bootstrap.less
file to your app assets directory. If you're using Rails, it would go undervendor/assets/stylesheets
- In your app's master less file, import
token-input-bootstrap
: - Enable the plug-in on an input field, with the
theme
option set tobootstrap
$(".token-input").tokenInput([
{id: 7, name: "Ruby"},
{id: 11, name: "Python"},
{id: 13, name: "JavaScript"},
{id: 17, name: "ActionScript"},
{id: 19, name: "Scheme"},
{id: 23, name: "Lisp"},
{id: 29, name: "C#"},
{id: 31, name: "Fortran"},
{id: 37, name: "Visual Basic"},
{id: 41, name: "C"},
{id: 43, name: "C++"},
{id: 47, name: "Java"}
], {
theme: "bootstrap",
preventDuplicates: true,
tokenLimit: 5,
hintText: null,
animateDropdown: false
});