JSFiddle - React, Tailwind, and code Playground

HTML

<label for="cb">
  <input id="cb" type="checkbox" />
   click me
</label>

JavaScript

var checkbox = document.getElementById("cb");
checkbox.indeterminate = true;
$('#cb').change(function(){alert('Change Event')});