JSFiddle - React, Tailwind, and code Playground

HTML

<div id="progress-bar">progress bar</div>

CSS

#progress-bar {
    width: 0;
    background: #f78;
    text-align: center;
    overflow: hidden;   
}

JavaScript

var progressBar = $('#progress-bar'),
    width = 0;

progressBar.width(width);

var interval = setInterval(function() {

    width += 10;

    progressBar.css('width', width + '%');

    if (width >= 100) {
        clearInterval(interval);
    }
}, 1000)