JSFiddle - React, Tailwind, and code Playground

HTML

<input id="boxid" type="checkbox"><label for="boxid">not checked</label>

JavaScript

$('#boxid').click(function() {
  if ($(this).is(':checked')) {
    $(this).siblings('label').html('checked');
  } else {
    $(this).siblings('label').html(' not checked');
  }
});