JSFiddle - React, Tailwind, and code Playground

by Shaunak Deshpande

HTML

<div class="modal-container share">
    <div class="content-lightbox-container">
        <div class="content-lightbox">
            <p>
                <div class="left">
                    <label>Text:</label>
                    <input/>
                </div>
                <div class="right">
                    <img src="http://placehold.it/50x50"></img>
                </div>
            </p>
            </br>
            <p>
                <div class="bottom">
                    <button>Close</button>
                </div>
            </p>
        </div>
    </div>
</div>

CSS

.modal-container.is-open {
    opacity: 1;
    pointer-events: auto;
    height: 100%;
    left: 0;
    top: 0;
}
.modal-container {
    background-color: rgba(55, 55, 55, 0.92);
    width: 100%;
    height: 0px;
    position: fixed;
    top: 500px;
    left: -9999px;
    z-index: 999;
    opacity: 0;
    -webkit-transition: opacity 300ms ease-in-out;
    -webkit-animation-direction: alternate;
    -ms-transition: opacity 300ms ease-in-out;
    -ms-animation-direction: alternate;
    transition: opacity 300ms ease-in-out;
    animation-direction: alternate;
    overflow: scroll;
}
.content-lightbox-container {
    width: 40%;
    max-width: 200px;
    margin: 0 auto;
    position: relative;
    top: 30%;
}
.content-lightbox {
    background-color: white;
    height: 200px;
    width: 200px;
    -webkit-overflow-scrolling: touch;
}
.left {
    float:left;
}
.right {
    float:right;
}
img {
    height:50px;
    width:50px;
}
input {
    width:20px;
    border: 1px solid blue;
    border-radius: 3px;
}
.left, .right {
    padding:2px;
}
.bottom {
    position:absolute;
    left: 36%;
    margin-top:70%;
}
label {
    color:blue;
}
button {
    cursor:pointer;
    color:white;
    background-color:blue;
    border: 1px solid blue;
    border-radius: 3px;
}

JavaScript

$(document).ready(function () {
    setTimeout(function () {
        $('.share').addClass('is-open');
    }, 500);
    
    $('button').click(function(){
        $('.is-open').removeClass('is-open');        
    });
    
});