JSFiddle - React, Tailwind, and code Playground

CSS

#progress {
    position: fixed;
    z-index: 100;
    top: 0;
    left: -6px;
    width: 1%;
    height: 5px;
    background: rgb(255, 0, 22);
    border-radius: 1px;   
    transition: width 500ms ease-out,opacity 400ms linear;
}

JavaScript

$(function() {
        $("body").append($("<div></div>").attr("id", "progress"));
        $("#progress").width((10)+"%");
});

//$(window).load(function() {
  //  $("#progress").width("101%").delay(300).fadeOut(400);
//});