Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


  <input class='customLook' value=''><button type="button">+</button>


  width: 100%;
  max-width: 700px;

  --tag-bg                  : #0052BF;
  --tag-hover               : #CE0078;
  --tag-text-color          : #FFF;
  --tags-border-color       : silver;
  --tag-text-color--edit    : #111;
  --tag-remove-bg           : var(--tag-hover);
  --tag-pad                 : .6em 1em;
  --tag-inset-shadow-size   : 1.3em;
  --tag-remove-btn-bg--hover: black;

  display: inline-block;
  min-width: 0;
  border: none;

.customLook .tagify__tag{
  margin-top: 0;

.customLook .tagify__tag > div{
  border-radius: 25px;

/* Do not show the "remove tag" (x) button when only a single tag remains */
.customLook .tagify__tag:only-of-type .tagify__tag__removeBtn{
  display: none;

.customLook .tagify__tag__removeBtn{
  opacity: 0;
  transform: translateX(-6px) scale(.5);
  margin-left: -3ch;
  transition: .12s;

.customLook .tagify__tag:hover .tagify__tag__removeBtn{
  transform: none;
  opacity: 1;
  margin-left: -1ch;

.customLook + button{
  color: #0052BF;
  font: bold 1.4em/1.65 Arial;
  border: 0;
  background: none;
  box-shadow: 0 0 0 2px inset currentColor;
  border-radius: 50%;
  width: 1.65em;
  height: 1.65em;
  cursor: pointer;
  outline: none;
  transition: .1s ease-out;
  margin: 0 0 0 5px;
  vertical-align: top;

.customLook + button:hover{
  box-shadow: 0 0 0 5px inset currentColor;

.customLook .tagify__input{
  display: none;


                // generate random whilist items (for the demo)
var randomStringsArr = Array.apply(null, Array(100)).map(function() {
  return Array.apply(null, Array(~~(Math.random() * 10  + 3))).map(function() {
    return String.fromCharCode(Math.random() * (123 - 97) + 97)
  }).join('') + ''

var input = document.querySelector('.customLook'),
    tagify = new Tagify(input, {
      // email address validation (
      pattern: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
      whitelist: randomStringsArr,
      callbacks: {
        "invalid": onInvalidTag
      dropdown : {
        position: 'text',
        enabled: 1 // show suggestions dropdown after 1 typed character
    button = input.nextElementSibling;  // "add new tag" action-button

button.addEventListener("click", onAddButtonClick)

function onAddButtonClick(){

function onInvalidTag(e){
  console.log("invalid", e.detail)