JSFiddle - React, Tailwind, and code Playground

HTML

<fieldset>
    
    <input type='checkbox' /> Click me
    <br><br>
    <input type='text' />
    <select>
        <option>one</option>
    </select>
    <textarea>
        sometext
    </textarea>
    <input type='submit' />
</fieldset>

JavaScript

$(':checkbox').change(function() {
    $(this).closest("fieldset")
        .find("input:not(:checkbox), select,textarea")
        .attr('disabled', this.checked);  
    });