JSFiddle - React, Tailwind, and code Playground

by Trina Lu

HTML

<div class="progress">
  <div class="bar"><div class="bar-active"></div></div>
  <div class="dot-wraps">
      <div class="dot"><span></span></div>
      <div class="dot"><span></span></div>
      <div class="dot"><span></span></div>
      <div class="dot"><span></span></div>
  </div>

</div>

CSS

.progress {
  width: 500px;
  position: relative;
}

.progress::before,
.progress::after {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: pink;
  content: "";
  position: absolute;
}

.progress::before {
  top: 50%; left: 0;
  transform: translateY(-50%);
}

.progress::after {
  top: 50%; right: 0;
  transform: translateY(-50%);
}

.bar {
  position: absolute;
  width: 100%;
  height: 2px;
  background: red;
  top: 50%; left: 0;
  transform: translateY(-50%);
  background: grey;
  z-index: -1;
}

.bar-active {
  width: 25%;
  background: red;
  height: 100%;
}

.dot-wraps {
  display: flex;
  width: 100%;
  justify-content: space-around;
}
.dot {
  height: 15px; width: 15px;
  background: gold;
  border-radius: 50%;
}