JSFiddle - React, Tailwind, and code Playground

HTML

<div id='loader'>
    <div id='overlay'></div>
    
    <div id='text'>
        Text content goes in here
    </div>
</div>

<div id='main'>Main Website Here</div>

CSS

#loader {
    display:block;
}
#overlay {
    position: absolute; 
    top: 0;
    height:250px;
    left: 0; 
    right: 0;      
    border-left: 50px solid #000; 
    background-color: #FFF;
    float:left;
    z-index:0;   
}
#text {
    font-size:24px;
    font-weight:bold;
    text-transform:uppercase;
    font-family:helvetica;
    float:left;
    display:none;
}
#main {
    display:none;    
    background:red;
    height:250px; 
    float:right;  
    position:absolute;
    top:250px;
    right:0;
    z-index:1;    
    
}

JavaScript

$(window).load(function() {    
    $rec = $('#overlay');
    $rec.animate({opacity:0}, {duration:50})
    .animate({opacity:1}, {duration:50})
    .animate({opacity:0}, {duration:50})
    .animate({opacity:1}, {duration:50})
    .animate({opacity:0}, {duration:50})
    .animate({ opacity:1, duration:50 }, function() { 
        //animation complete       
        $('#text').show();        
        $('#overlay').delay(500).animate({
            left:$(this).width()
        }, 800, function() {               
            $('#overlay').delay(1000).animate({
                //go back to the beginning
                left:0
            }, 1000, function() {  
               //rehide the text
               $('#text').hide();
               //flicker once rectangle goes back to beginning
               $(this).animate({opacity:0}, {duration:50})
                .animate({opacity:1}, {duration:50})
                .animate({opacity:0}, {duration:50})
                .animate({opacity:1}, {duration:50})
                .animate({opacity:0}, {duration:50},function() {
                   //fade out after flicker
                   $(this).fadeOut('slow');
                });                
            });
            $('#main').delay(1100).show({ duration: 10}).css({ width: '50px' }).animate({                
                width:'100%',
                right:0
            }, 1000);
        });                    
    }); //ends the overlay going back to the left           
});