JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" name="fruits">1</input>
<input type="checkbox" name="fruits">2</input>
<input type="checkbox" name="fruits">3</input>
JavaScript
$(':checkbox').on('change',function(){
var thiscb = $(this);
var name = thiscb.prop('name');
if(thiscb.is(':checked'))
{
$(':checkbox[name="' + name + '"]').not($(this)).prop('checked',false);
}
});