JSFiddle - React, Tailwind, and code Playground

HTML

<div class="contact_form">
    <button class="trigger">Toggle popup</button>
    
    <div class="form_container">
    </div>

</div>

CSS

body {
    height: 2100px;
    margin:0;
}
body.popup-visible {
    position   : fixed;
    width: 100%;
    height: 100%;
}

.contact_form{
    width      : 60%; 
    height     : 80%;
    background : rgba(0, 0, 0, 0.7);;
    position   : absolute;
    top        : 0;
    left       : 0;
    right: 0;
    margin: 0 auto;
}

JavaScript

$('.trigger').click(function() {
    $('.form_container').toggle();
    $('body').toggleClass('popup-visible');
});