JSFiddle - React, Tailwind, and code Playground
by tr_santi
HTML
<div id="timer"><span class="init"></span></div>
CSS
#timer {
height: 30px;
display: block;
overflow: hidden;
background: grey;
}
#timer span {
height: 100%;
display: block;
background: green;
transition: 20s width linear;
width: 100%;
}
#timer span.load{
width: 0%;
}
JavaScript
$(document).ready(function() {
$("#timer span").addClass("load");
});