Snippets Carousel

Bootstrap 5 Promo Banner Carousel Slider

A promotional banner carousel with three slides, previous and next buttons, pill-shaped indicators and autoplay.

Bootstrap 5 No jQuery Jan 2020 2.5K views

<section class="wdw-stage">
  <div class="container" style="max-width:1000px">
    <div class="d-flex flex-wrap justify-content-between align-items-end gap-3 mb-4">
      <div><span class="wdw-eyebrow">Featured</span><h2 class="wdw-heading h3 mt-1 mb-0">This season's highlights</h2></div>
      <div class="d-flex gap-2">
        <button class="btn btn-outline-secondary rounded-circle p-0 wdw-nav" type="button" id="promoToggle" aria-label="Pause automatic slide show" aria-pressed="false">
          <span class="wdw-ico-pause"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 5v14M15 5v14"/></svg></span><span class="wdw-ico-play" hidden><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M7 4l13 8-13 8z"/></svg></span></button>
        <button class="btn btn-outline-secondary rounded-circle p-0 wdw-nav" type="button" data-bs-target="#promoCarousel" data-bs-slide="prev" aria-label="Previous slide"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 6l-6 6 6 6"/></svg></button>
        <button class="btn btn-primary rounded-circle p-0 wdw-nav" type="button" data-bs-target="#promoCarousel" data-bs-slide="next" aria-label="Next slide"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 6l6 6-6 6"/></svg></button>
      </div>
    </div>
    <div id="promoCarousel" class="carousel slide wdw-card overflow-hidden" aria-roledescription="carousel" aria-label="Promotions">
      <div class="carousel-indicators wdw-dots">
        <button type="button" data-bs-target="#promoCarousel" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
        <button type="button" data-bs-target="#promoCarousel" data-bs-slide-to="1" aria-label="Slide 2"></button>
        <button type="button" data-bs-target="#promoCarousel" data-bs-slide-to="2" aria-label="Slide 3"></button>
      </div>
      <div class="carousel-inner">
        <div class="carousel-item active" role="group" aria-roledescription="slide" aria-label="1 of 3">
          <div class="wdw-slide wdw-aurora">
            <div class="wdw-slide-body"><span class="badge rounded-pill text-bg-light mb-3">Limited time</span><h3 class="wdw-big mb-3">Up to 50% off</h3><p class="h5 fw-semibold mb-4 wdw-sub">The big seasonal sale</p><a href="#" class="btn btn-light rounded-pill px-4">Start shopping</a><p class="small opacity-75 mt-4 mb-0">Valid 26 Dec – 31 Jan on selected items.</p></div>
            <img class="wdw-slide-img" src="https://images.unsplash.com/photo-1483985988355-763728e1935b?auto=format&fit=crop&w=800&q=70" alt="Two shoppers holding bags in a boutique" loading="lazy">
          </div>
        </div>
        <div class="carousel-item" role="group" aria-roledescription="slide" aria-label="2 of 3">
          <div class="wdw-slide wdw-aurora wdw-flip">
            <div class="wdw-slide-body"><span class="badge rounded-pill text-bg-light mb-3">New in</span><h3 class="wdw-big mb-3">Winter collection</h3><p class="h5 fw-semibold mb-4 wdw-sub">Layers made to last</p><a href="#" class="btn btn-light rounded-pill px-4">Explore now</a><p class="small opacity-75 mt-4 mb-0">Free delivery on orders over $60.</p></div>
            <img class="wdw-slide-img" src="https://images.unsplash.com/photo-1445205170230-053b83016050?auto=format&fit=crop&w=800&q=70" alt="Rail of winter clothing in a store" loading="lazy">
          </div>
        </div>
        <div class="carousel-item" role="group" aria-roledescription="slide" aria-label="3 of 3">
          <div class="wdw-slide wdw-aurora">
            <div class="wdw-slide-body"><span class="badge rounded-pill text-bg-light mb-3">Members</span><h3 class="wdw-big mb-3">Early access</h3><p class="h5 fw-semibold mb-4 wdw-sub">Shop the drop 24h before everyone</p><a href="#" class="btn btn-light rounded-pill px-4">Join free</a><p class="small opacity-75 mt-4 mb-0">Cancel anytime, no card needed.</p></div>
            <img class="wdw-slide-img" src="https://images.unsplash.com/photo-1441986300917-64674bd600d8?auto=format&fit=crop&w=800&q=70" alt="Shelves of folded clothes in a shop" loading="lazy">
          </div>
        </div>
      </div>
    </div>
  </div>
</section>

Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.

Free to use in personal and commercial projects under the MIT license.