JSFiddle - React, Tailwind, and code Playground

HTML

<div class="progressbar"></div>

CSS

@keyframes progress{
  from{
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0%);
  }
}
@keyframes hide{
from{
opacity: 1;
}
to{
opacity: 0;
}
}
.progressbar {
  position: relative;
  margin: 10px;
  height: 20px;
  border: 1px solid #999;
  border-radius: 3px;
  overflow: hidden;
  animation: hide 0.1s 60s ease-in-out forwards;
}

.progressbar:after{
  content: '';
  position: absolute;
  background: #2ca12e;
  height: 100%;
  width: 100%;
  animation: progress 60s linear forwards;
}