JSFiddle - React, Tailwind, and code Playground
HTML
<div class="checkbox filter-single">
<input type="checkbox" value=".rain" />
<label>Rain</label>
</div>
<div class="filter-details">
<span class="filter-title">Filters:</span>
<ul class="filters-current"></ul>
</div>
JavaScript
$('.filter-single input').on('click', function () {
if ($(this).is(':checked')) {
$('<li>' + $(this).next("label").text() + ' /</li>').appendTo('.filters-current');
} else {
$(".filters-current").find("li:contains('" + $(this).next("label").text() + " /')").remove();
}
});