JSFiddle - React, Tailwind, and code Playground

HTML

<label><input type="checkbox" id="chk"/>Label for chk</label>

<button id="check">check</button>
<button id="uncheck">uncheck</button>

JavaScript

$("#check").click(function(e) {
    e.preventDefault();
    $("#chk").attr("checked", true);
});

$("#uncheck").click(function(e) {
    e.preventDefault();
    $("#chk").attr("checked", false);
});