JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width" />
    <link
          rel="stylesheet"
          href="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/carousel/carousel.css"
          />
    <style>
      #myCarousel {
        margin-bottom: 50px;
      }
      
      #myCarousel .f-carousel__slide {
        padding: 50px;
        background: #eee;
        text-align: center;
      }
    </style>
  </head>
  <body>
    <div>
      <div class="f-carousel" id="myCarousel">
        <div class="f-carousel__slide">1</div>
        <div class="f-carousel__slide">2</div>
        <div class="f-carousel__slide">3</div>
        <div class="f-carousel__slide">4</div>
        <div class="f-carousel__slide">5</div>
      </div>
      <p>
        <button id="slidePrev">
          ⟵
        </button>
        <button id="slideNext">
          ⟶
        </button>
      </p>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/carousel/carousel.umd.js"></script>
    <script>
      const myCarousel = new Carousel(document.getElementById("myCarousel"), {
        Navigation: false
      });

      document.getElementById("slidePrev").addEventListener("click", () => {
        myCarousel.slidePrev();
      });

      document.getElementById("slideNext").addEventListener("click", () => {
        myCarousel.slideNext();
      });
    </script>
  </body>
</html>