JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" name="fruits" />
<input type="checkbox" name="fruits" />
<input type="checkbox" name="fruits" />
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);
}
});