MCPcopy Create free account
hub / github.com/developit/tags-input

github.com/developit/tags-input

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.1.0 ↗ · + Follow · compare 2 versions
22 symbols 60 edges 2 files 0 documented · 0% updated 6y ago1.1.0 · 2016-04-29★ 3336 open issues

Browse by type

Functions 22 Types & classes 0
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

tags-input

NPM Version Bower Version Gitter Room

Features:

  • I said <input type="tags"> should be a thing.
  • With full keyboard, mouse and focus support.
  • Works with HTML5 pattern and placeholder attributes, too!
  • Native change and input ("live" change) events.
  • Using preact? (or react?) There's a wrapper called preact-token-input

Screenshot:

screenshot

JSFiddle Demo


Examples

It's easy to use! In addition to the example code, you'll also need to include tags-input.css - I didn't bundle it because that's a bit gross.

CommonJS:

var tagsInput = require('tags-input');

// create a new tag input:
var tags = document.createElement('input');
tags.setAttribute('type', 'tags');
tagsInput(tags);
document.body.appendChild(tags);

// enhance an existing input:
tagsInput(document.querySelector('input[type="tags"]'));

// or just enhance all tag inputs on the page:
[].forEach.call(document.querySelectorAll('input[type="tags"]'), tagsInput);

HTML Example:

<link rel="stylesheet" href="https://github.com/developit/tags-input/raw/1.1.0/tags-input.css">
<script src="https://github.com/developit/tags-input/raw/1.1.0/tags-input.js"></script>

<form>
    <label>
        Add some
        <input name="hashtags" type="tags" pattern="^#" placeholder="#hashtags">
    </label>
</form>

<script>[].forEach.call(document.querySelectorAll('input[type="tags"]'), tagsInput);</script>

Core symbols most depended-on inside this repo

Shape

Function 22

Languages

TypeScript100%

Modules by API surface

tags-input.js11 symbols
src/tags-input.js11 symbols

Dependencies from manifests, versioned

babel5.8.21 · 1×
gzip-size3.0.0 · 1×
jshint2.8.0 · 1×
less2.5.1 · 1×
less-plugin-autoprefix1.4.2 · 1×
less-plugin-clean-css1.5.1 · 1×
pretty-bytes2.0.1 · 1×

For agents

$ claude mcp add tags-input \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page