How to control visibility

Bootstrap provides two classes to control visibilities of elements. These classes do not modify the display property at all and do not affect layout.

You might also be interested in collapsible elements.

<div class="border border-dark">
    <div class="invisible 
        border border-success m-1" 
        style="height: 100px;"></div>
    
    <div class="visible 
        border border-info m-1" 
        style="height: 100px;"></div>
</div>