JSFiddle - React, Tailwind, and code Playground
HTML
<input type="checkbox" class="test" />
<input type="checkbox" class="test" />
<input type="checkbox" class="test" />
<input type="checkbox" class="test" />
<input type="checkbox" class="test" />
JavaScript
$('.test').change(function(){
if($('input.test').filter(':checked').length == 1)
$('input.test:not(:checked)').attr('disabled', 'disabled');
else
$('input.test').removeAttr('disabled');
});