<div class="form-item ">
    <label for="tags">
        Stored at

    </label>
    <input type="text" id="tags" value="" class="tags-input">
</div>
{{> @form-item-input}}
{
  "label": "Stored at",
  "id": "tags",
  "input-classes": "tags-input"
}
  • Content:
    /**
     * Initialize Choices for tags input
     */
    
    /* global Choices */
    
    'use strict';
    
    (function () {
      const tagsInputs = document.querySelectorAll('.tags-input');
    
      // Stop if no element is present
      if (!tagsInputs.length) return;
    
      new Choices('.tags-input', {
        removeItemButton: true,
        shouldSort: false,
        duplicateItemsAllowed: false,
        items: [
          { value: 'shelf1' },
          { value: 'rack4' },
        ],
      });
    })();
    
  • URL: /components/raw/tags-input/tags-input.js
  • Filesystem Path: components/02_molecules/tags-input/tags-input.js
  • Size: 433 Bytes

Tags input

Custom input with tagging functionality. Depends on the library Choices.js.