JSFiddle - React, Tailwind, and code Playground

HTML

<div class="progress-bar" align="left">
    <span id="prog"></span>
    <br><br>
        <label id="indice" style="color:#FFFFFF">0%</label>
</div>
        

<input value="Download" type="button" onclick="startTime(i);">

CSS

.progress-bar span {
    display: inline-block;
    height: 25px;
    width: 0%;
             
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
             
    -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
    -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset;
 
    background: rgb(1,182,178);
    background: linear-gradient(bottom, rgb(1,182,178) 39%, rgb(27,219,214) 70%, rgb(54,255,255) 85%);
    background: -o-linear-gradient(bottom, rgb(1,182,178) 39%, rgb(27,219,214) 70%, rgb(54,255,255) 85%);
    background: -moz-linear-gradient(bottom, rgb(1,182,178) 39%, rgb(27,219,214) 70%, rgb(54,255,255) 85%);
    background: -webkit-linear-gradient(bottom, rgb(1,182,178) 39%, rgb(27,219,214) 70%, rgb(54,255,255) 85%);
    background: -ms-linear-gradient(bottom, rgb(1,182,178) 39%, rgb(27,219,214) 70%, rgb(54,255,255) 85%);
    background: -webkit-gradient(linear, left bottom, left top, color-stop(0.39, rgb(1,182,178)), color-stop(0.7, rgb(27,219,214)), color-stop(0.85, rgb(54,255,255)));
}

.progress-bar {
    background-color: #1a1a1a;
    height: 25px;
    padding: 5px;
    width: 90%;
    margin: 60px 0;
             
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
             
    -moz-box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
    -webkit-box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
    box-shadow: 0 1px 5px #000 inset, 0 1px 0 #444;
}

.progress-bar span {
    -webkit-transition: width .4s ease-in-out;
    -moz-transition: width .4s ease-in-out;
    -ms-transition: width .4s ease-in-out;
    -o-transition: width .4s ease-in-out;
    transition: width .4s ease-in-out;
}

JavaScript

function startTime( i )
 {
     if ( i < 100 )
     {
         document.getElementById("movingbar").style.width = i + "%";
         i++;
         t = setTimeout('startTime('+i+')', 50);
     } else return;
 }