JSFiddle - React, Tailwind, and code Playground
HTML
<div class="bootstrap-tagsinput">
<span class="tag label label-info">1<span data-role="remove"></span></span>
</div>
CSS
.tag [data-role="remove"]::after {
content: "x";
padding: 0px 2px;
}
JavaScript
$(document).ready(function(){
$(".bootstrap-tagsinput").children(".tag").on("click",function(e){
alert("hello");
})
});