JSFiddle - React, Tailwind, and code Playground

by Victor

HTML

<input type="checkbox">
    <span class="switch">sw</span>

JavaScript

$('.switch').click(function(){
$('input').trigger('click');
});