JSFiddle - React, Tailwind, and code Playground

by Venkadeshwaran T.S

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);   
  }
});