JSFiddle - React, Tailwind, and code Playground

HTML

<div id="checkbox_group">
    <input type="checkbox" value="21" name="" />21
    <input type="checkbox" value="16" name="" />16
    <input type="checkbox" value="20" name="" />20</div>

JavaScript

$('#checkbox_group input[type=checkbox]').click(function() {    
    if (this.checked) {
        $(this).siblings('input[type=checkbox]').prop('checked', false);
    }
    else {
        // if is NOT checked then check it liek checked="true"
        $(this).siblings('input[type=checkbox]').prop('checked', true);
    }
});