JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://npmcdn.com/tags-input"></script>
<link rel="stylesheet" href="https://npmcdn.com/tags-input/tags-input.css">
<script src="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>
Babel + JSX
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);