JSFiddle - React, Tailwind, and code Playground

by Michael Prosser

HTML

<input type="checkbox" value="1" id="mycheckbox" />

JavaScript

document.querySelector('#mycheckbox').setAttribute('checked',true);