JSFiddle - React, Tailwind, and code Playground
HTML
<div class="progress-bar">
<div class="progress">hover</div>
</div>
CSS
*{
margin: 0;
padding: 0;
}
.progress-bar{
margin: 10px;
width: 100px;
height: 20px;
background: red;
}
.progress{
-webkit-transition: width .5s ease;
-moz-transition: width .5s ease;
-ms-transition: width .5s ease;
-o-transition: width .5s ease;
width: 70px;
height: 17px;
font-family: Arial;
font-size: 10px;
color: #000;
overflow: hidden;
padding: 3px 5px 0 5px;
background: #CCC;
}
.progress-bar:hover{
cursor: default;
}
.progress-bar:hover .progress{
width: 40px;
}