Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Tokenized text input for "tags"
branch: master

This branch is 24 commits behind component:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
History.md
Makefile
Readme.md
component.json
index.js
pillbox.css
screenshot.jpg

Readme.md

Pillbox

Pillbox input component, a fork of tomerdmnt/tag-input.

Tags Input

Install

$ component install component/pillbox

Example

var Pillbox = require('pillbox');

var input = Pillbox(document.getElementById('tags'))

input.on('add', function(tag){
  console.log(tag + ' added');
});

input.on('remove', function(tag){
  console.log(tag + ' removed');
});

Events

  • add (tag)
  • remove (tag)

API

Pillbox(input, options)

Initialize with the given input element and options. Available options include:

  • lowercase: all added tags get converted to lowercase.

Pillbox#add(tag)

Add tag string if it does not already exist.

Pillbox#remove(tag)

Remove tag string if it exists.

Pillbox#values()

Return an array of the tags.

License

MIT

Something went wrong with that request. Please try again.