<body>
  <div class="container">
    <h2 class="title">You're done!</h2>
    <div class="progress-container">
      <div class="progress" id="progress"></div>
      <div class="circle active">1</div>
      <div class="circle">2</div>
      <div class="circle">3</div>
      <div class="circle">4</div>
    </div>
    <button class="btn" id="prev" disabled>Prev</button>
    <button class="btn" id="next">Next</button>
  </div>

</body>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
:root {
  --line-border-fill: #3498db;
  --line-border-empty: #e0e0e0;
}

body {
  display: flex;
  position: relative;
  width: 100%;
  height: 100vh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  animation: show 0.8s ease;
}
.container {
  text-align: center;

  .progress-container {
    display: flex;
    position: relative;
    justify-content: space-between;
    margin-bottom: 30px;
    width: 350px;
    max-width: 100%;
  }
  .progress-container::before {
    content: "";
    display: flex;
    background-color: var(--line-border-empty);
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    transform: translateY(-50%);
    z-index: -1;
  }
  .progress {
    display: flex;
    background-color: var(--line-border-fill);
    position: absolute;
    top: 50%;
    left: 0;
    width: 0%;
    height: 4px;
    transform: translateY(-50%);
    z-index: -1;
    transition: 0.4s ease;
  }

  .circle {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: #999;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid var(--line-border-empty);
    transition: 0.4s ease;
  }
  .circle.active {
    border-color: var(--line-border-fill);
  }
}

.btn {
  background-color: var(--line-border-fill);
  color: #ffff;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 8px 30px;
  margin: 5px;
  font-size: 14px;
  border-radius: 25px;
}
.btn:active {
  transform: scale(0.95);
}

.btn:disabled {
  background: var(--line-border-empty);
  cursor: not-allowed;
}

.title {
  display: none;
  position: relative;
  bottom: 65px;
  font-size: 26px;
  font-weight: 700;
  animation: show1 0.4s ease-in;
}
@keyframes show {
  0% {
    opacity: 0;
    margin-top: 25px;
  }
  100% {
    opacity: 1;
    margin-top: 0px;
  }
}
@keyframes show1 {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}
View Compiled
const progress = document.querySelector("#progress");
const prev = document.querySelector("#prev");
const next = document.querySelector("#next");
const circles = document.querySelectorAll(".circle");

let currentActive = 1;

next.addEventListener("click", () => {
  currentActive++;

  if (currentActive > circles.length) {
    currentActive = circles.length;
  }
  update();
});

prev.addEventListener("click", () => {
  currentActive--;

  if (currentActive < 1) {
    currentActive = 1;
  }

  update();
});

function update() {
  circles.forEach((i, index) => {
    if (index < currentActive) {
      i.classList.add("active");
    } else {
      i.classList.remove("active");
    }
  });

  const actives = document.querySelectorAll(".active");

  progress.style.width =
    ((actives.length - 1) / (circles.length - 1)) * 100 + "%";
  if (currentActive == 1) {
    prev.disabled = true;
  } else if (currentActive == circles.length) {
    next.disabled = true;
    document.querySelector(".title").style.display = "block";
  } else {
    prev.disabled = false;
    next.disabled = false;
    document.querySelector(".title").style.display = "none";
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.