<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 class="swiper-slide">Slide 5</div>
      <div class="swiper-slide">Slide 6</div>
      <div class="swiper-slide">Slide 7</div>
      <div class="swiper-slide">Slide 8</div>
      <div class="swiper-slide">Slide 9</div>
      <div class="swiper-slide">Slide 10</div>
      <div class="swiper-slide">Slide 11</div>
      <div class="swiper-slide">Slide 12</div>
      <div class="swiper-slide">Slide 13</div>
      <div class="swiper-slide">Slide 14</div>
      <div class="swiper-slide">Slide 15</div>
      <div class="swiper-slide">Slide 16</div>
      <div class="swiper-slide">Slide 17</div>
      <div class="swiper-slide">Slide 18</div>
      <div class="swiper-slide">Slide 19</div>
      <div class="swiper-slide">Slide 20</div>
    </div>
    <!-- Add Pagination -->
    <div class="swiper-pagination"></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: 70%;
      height: 100%;
      margin-right: auto;
    }
.swiper-wrapper {
  max-width: 80%;
}
    .swiper-slide {
      text-align: center;
      font-size: 18px;
      background: tomato;
      height: 100%;
    opacity: 0;
      display: flex;
      justify-content: center;
      align-items: center;
     transition: .3s all;
    }

.swiper-slide-active,
.swiper-slide-duplicate-active {
  opacity: 1;
  background-color: orange;
   transform: scale(1);
}

.swiper-slide-active ~ .swiper-slide,
.swiper-slide-duplicate-active ~ .swiper-slide {
    opacity: 0.3;
     transform: scale(0.8);
}
var swiper = new Swiper(".swiper-container", {
  slidesPerView: 1,
  loop: false,
  spaceBetween: 30,
  loopAdditionalSlides: 1,
  pagination: {
    el: ".swiper-pagination",
    clickable: true
  }
});

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