Snippets Carousel

Bootstrap 5 Carousel with Tabbed Navigation

A fading image carousel with captions, driven by four tab buttons underneath that stay in sync with the active slide.

Bootstrap 5 No jQuery Sep 2020 2.8K views

<section class="wdw-stage">
  <div class="container" style="max-width:1040px">
    <div class="wdw-card overflow-hidden">
      <h1 class="visually-hidden">Company overview</h1>
      <div id="tabCarousel" class="carousel slide carousel-fade" data-bs-ride="false">
        <div class="carousel-inner">
          <div class="carousel-item active tc-slide" role="tabpanel" id="tcPanel0" aria-labelledby="tcTab0" style="--img:url('https://images.unsplash.com/photo-1498050108023-c5249f4df085?auto=format&fit=crop&w=1400&q=70')"><div class="tc-cap"><h2 class="h2 fw-bold mb-2">Amazing digital experience</h2><p class="mb-0">Learn what makes us different and how we work with you.</p></div></div>
          <div class="carousel-item tc-slide" role="tabpanel" id="tcPanel1" aria-labelledby="tcTab1" style="--img:url('https://images.unsplash.com/photo-1517694712202-14dd9538aa97?auto=format&fit=crop&w=1400&q=70')"><div class="tc-cap"><h2 class="h2 fw-bold mb-2">Built for speed</h2><p class="mb-0">Everything you need, nothing you do not.</p></div></div>
          <div class="carousel-item tc-slide" role="tabpanel" id="tcPanel2" aria-labelledby="tcTab2" style="--img:url('https://images.unsplash.com/photo-1519389950473-47ba0277781c?auto=format&fit=crop&w=1400&q=70')"><div class="tc-cap"><h2 class="h2 fw-bold mb-2">Simple pricing</h2><p class="mb-0">One plan that scales with your team.</p></div></div>
          <div class="carousel-item tc-slide wdw-aurora" role="tabpanel" id="tcPanel3" aria-labelledby="tcTab3"><div class="tc-cap"><h2 class="h2 fw-bold mb-2">We are here to help</h2><p class="mb-0">Real people, real answers, every day.</p></div></div>
        </div>
      </div>
      <div class="tc-tabs row row-cols-2 row-cols-md-4 g-0" role="tablist" aria-label="Carousel slides">
        <div class="col"><button type="button" class="tc-tab active" role="tab" id="tcTab0" aria-controls="tcPanel0" aria-selected="true" data-bs-target="#tabCarousel" data-bs-slide-to="0"><span class="tc-ico"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 8h.01M11 12h1v4h1"/></svg></span><strong>About</strong><span>Who we are</span></button></div>
        <div class="col"><button type="button" class="tc-tab" role="tab" id="tcTab1" aria-controls="tcPanel1" aria-selected="false" data-bs-target="#tabCarousel" data-bs-slide-to="1"><span class="tc-ico"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M13 2 3 14h9l-1 8 10-12h-9z"/></svg></span><strong>Features</strong><span>What you get</span></button></div>
        <div class="col"><button type="button" class="tc-tab" role="tab" id="tcTab2" aria-controls="tcPanel2" aria-selected="false" data-bs-target="#tabCarousel" data-bs-slide-to="2"><span class="tc-ico"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 12 12 20 4 12V4h8z"/><circle cx="8.5" cy="8.5" r="1"/></svg></span><strong>Pricing</strong><span>Plans for teams</span></button></div>
        <div class="col"><button type="button" class="tc-tab" role="tab" id="tcTab3" aria-controls="tcPanel3" aria-selected="false" data-bs-target="#tabCarousel" data-bs-slide-to="3"><span class="tc-ico"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 13v-1a8 8 0 0 1 16 0v1"/><rect x="3" y="13" width="4" height="6" rx="1.5"/><rect x="17" y="13" width="4" height="6" rx="1.5"/></svg></span><strong>Support</strong><span>Talk to us</span></button></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.