JSFiddle - React, Tailwind, and code Playground

HTML

<input type="checkbox" value="checking"> <a href="#" class="open-box">Show next box</a>

<div class="box1"></div>

CSS

.open-box {
    display:none;
}

.box1 {
   background-color:red;
    width:200px;
    height:100px;
    display:none;
}

JavaScript

$('input[type="checkbox"]').click(function(){
    if($(this).is(":checked")){
        $(".open-box").show();
    }else{
        $(".open-box").hide();
        if( $(".box1").is(":visible")){
            $(".box1").hide();
        }
    }
});

$('.open-box').click(function() {
    $(".box1").slideToggle();
});