JSFiddle - React, Tailwind, and code Playground
HTML
<div id="progress">
<span id="percent">30%</span>
<div id="bar"></div>
</div>
CSS
#progress {
width: 500px;
border: 1px solid black;
position: relative;
padding: 3px;
}
#percent {
position: absolute;
left: 50%;
}
#bar {
height: 20px;
background-color: green;
width: 30%;
}