The “simple-tags” is a modest Vanilla JavaScript plugin that allows you to create tag input. This pure JS tags input plugin useful to insert new tags, remove tags and display predefined tag in a HTML container. Besides this, you can also style tags field with additional CSS according to your needs.
JavaScript Tag Input Overview and Preview
Plugin: | simple-tags |
Author: | kurtobando |
Category: | Text & Input |
Published: | January 19, 2024 |
File Type: | zip archive (HTML, CSS & JavaScript ) |
Package Size: | File not found! |
Dependencies: | No dependency! |
How to Create JavaScript Tag Input
1. After downloading, include plugin’s CSS and Js file in your web project.
<!-- simple-tags CSS --> <link rel="stylesheet" href="css/style.css"> <!-- simple-tags JS --> <script src="js/script-min.js"></script>
2. Now, create HTML div
element with class name simple-tags
and place some tags (if you want to display predefined) in data-tags
jut like below:
<div class="simple-tags" id="container" data-simple-tags="CodeHim, HTML, CSS, JavaScript, jQuery, Bootstrap"> </div>
3. Finally, get the container element by id in JavaScript and call the plugin with it to active tags input.
<script> var el = document.getElementById('container'); new Tags(el); <\script>
Changelog
7/11/2019
- Minor update
index.html
1/11/2019
- Initial release.
Submit Your Review
[site_reviews_form assign_to=”post_id”]
Similar Code Snippets:
I code and create web elements for amazing people around the world. I like work with new people. New people new Experiences.
I truly enjoy what I’m doing, which makes me more passionate about web development and coding. I am always ready to do challenging tasks whether it is about creating a custom CMS from scratch or customizing an existing system.