JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" id="check" value="1">
<label for="check">check</label>
JavaScript
$("input").change(function() {
if (this.checked) {
$(this).next().css("color","green");
} else {
$(this).next().css("color","black");
}
});