JSFiddle - React, Tailwind, and code Playground

HTML

<label><input type="checkbox" /> label</label>

CSS

.red {
  color: red;
}

JavaScript

$('input').change(function() {
    $('label').toggleClass('red');
});