JSFiddle - React, Tailwind, and code Playground
HTML
<div></div>
CSS
div {
background: blue;
color: white;
width: 0px;
height: 20px;
}
JavaScript
var i = 0;
(function(){
if(++i <= 300){
var element = document.getElementsByTagName('div')[0];
element.style.width = i+'px';
element.innerHTML = parseInt(i/3)+'%';
setTimeout(arguments.callee, 10);
}
})();