<div class="swiper-container">
  <div class="swiper-wrapper">
    <div class="swiper-slide">Slide 1</div>
    <div class="swiper-slide">Slide 2</div>
    <div class="swiper-slide">Slide 3</div>
    <div class="swiper-slide">Slide 4</div>
  </div>
  <!-- Add Pagination -->
  <div class="dots"></div>
  <div class="counter"></div>
</div>
html,
body {
  position: relative;
  height: 100%;
  overflow: hidden;
}
body {
  background: #eee;
  font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #000;
  margin: 0;
  padding: 0;
}
.swiper-container {
  width: 50%;
  height: 100%;
  margin-left: auto;
  margin-right: auto;
}
.swiper-slide {
  text-align: center;
  font-size: 18px;
  background: #fff;
  height: 100%;
  opacity: 0.3;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.3s all;
}

.swiper-slide-active {
  opacity: 1;
  background-color: orange;
}

.dots.swiper-horizontal > .swiper-pagination-bullets,
.dots.swiper-pagination-bullets.swiper-pagination-horizontal,
.swiper-pagination-custom,
.dots.swiper-pagination-fraction,
.dots {
  position: absolute;
  bottom: auto;
  left: auto;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  width: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 20px;
  cursor: pointer;
}

.dot {
  width: 20px;
  height: 20px;
  background: transparent;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.7;
}

.dot_active {
  opacity: 1;
}

.dot:before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  background-color: tomato;
  border-radius: 50%;
}

.dot:after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid tomato;
  border-radius: 50%;
  position: absolute;
  left: 0;
  right: 0;
  box-sizing: border-box;
  opacity: 0;
  transition: 0.3s all;
}

.dot:hover:after {
  opacity: 0.5;
}

.dot_active:hover:after,
.dot_active:after {
  opacity: 1;
}


.counter {
  position: absolute;
  left: 5%;
  top: 5%;
  z-index: 100;
  font-size: 10vw;
  font-weight: bold;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.counter__total {
  font-size: 0.5em;
  margin-top: .2em;
}
var swiper = new Swiper(".swiper-container", {
  slidesPerView: 1,
loop: false,
  init: false,
  spaceBetween: 30,
  pagination: {
            el: '.dots',
            type: "bullets",
            clickable: true,
            bulletClass: "dot",
            bulletActiveClass: "dot_active",
            renderBullet: function (index, className) {
                return '<div class="' + className + '"></div>';
            },
        },
    
});

swiper.on("slideChange afterInit slidesLengthChange", function () {
    let currentSlide = this.activeIndex + 1;
    document.querySelector('.counter').innerHTML = `
    <span class="counter__current">
    ${currentSlide}
    </span> 
    / 
    <span class="counter__total">
      ${this.slides.length}
    </span>`;
});

swiper.init();

External CSS

  1. https://unpkg.com/swiper@7.0.6/swiper-bundle.min.css

External JavaScript

  1. https://unpkg.com/swiper@7.0.6/swiper-bundle.min.js