JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>

<script>
$(document).ready(
function()
{
	$('.all').click(function(){
  	
    var checked = $('input:checkbox').not(':checked');
    $('input:checkbox:checked').removeAttr('checked');
    checked.attr('checked','checked');
  });
  });
</script>
<button type="image" class="all" title="All" >Toggle</button>
<input type="checkbox" checked="checked" />
<input type="checkbox" />