Snippets Card

Bootstrap 5 Product Tour with Navbar, Cards and Gallery

A landing page with a sticky navbar, search field, profile cards and a masonry gallery, plus a guided popover tour that highlights each area step by step.

Bootstrap 5 No jQuery Oct 2019 3K views

<div class="wdw-page">
  <header class="wdw-header sticky-top">
    <nav class="navbar navbar-expand-lg py-2" aria-label="Main" id="tourNav">
      <div class="container">
        <a class="navbar-brand d-flex align-items-center gap-2 fw-bold wdw-heading" href="#"><span class="wdw-logo" aria-hidden="true">T</span> Tourist</a>
        <button class="navbar-toggler border-0 shadow-none" type="button" data-bs-toggle="collapse" data-bs-target="#tourMenu" aria-controls="tourMenu" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
        <div class="collapse navbar-collapse" id="tourMenu">
          <ul class="navbar-nav me-auto mt-3 mt-lg-0">
            <li class="nav-item"><a class="nav-link active" aria-current="page" href="#">Home</a></li>
            <li class="nav-item"><a class="nav-link" href="#">Features</a></li>
            <li class="nav-item dropdown">
              <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">Explore</a>
              <ul class="dropdown-menu"><li><a class="dropdown-item" href="#">Photography</a></li><li><a class="dropdown-item" href="#">Culinary</a></li><li><hr class="dropdown-divider"></li><li><a class="dropdown-item" href="#">All topics</a></li></ul>
            </li>
          </ul>
          <form class="d-flex mt-3 mt-lg-0" role="search" id="tourSearch" onsubmit="return false">
            <input class="form-control rounded-pill" type="search" placeholder="Search" aria-label="Search" style="min-width: 14rem">
          </form>
        </div>
      </div>
    </nav>
  </header>

  <main class="container py-4" style="max-width: 1040px">
    <section class="text-center mb-4">
      <span class="wdw-eyebrow">Interactive guide</span>
      <h1 class="wdw-heading display-5 mt-1 mb-2">Bootstrap Tour</h1>
      <p class="wdw-muted mx-auto mb-4" style="max-width: 32rem">Walk new visitors through the navigation, search, cards and gallery in four short steps.</p>
      <button type="button" class="btn btn-primary rounded-pill px-4" id="startTour">Start the tour</button>
    </section>

    <section class="mb-4" id="tourCards" aria-labelledby="cardsTitle">
      <h2 class="h5 wdw-heading mb-3" id="cardsTitle">Cascading cards</h2>
      <div class="row g-4">
        <div class="col-md-4"><article class="card wdw-card-sm h-100 border-0 overflow-hidden">
          <img src="https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=600&h=400&fit=crop&q=80" class="card-img-top" alt="Portrait of a smiling woman" height="200" style="object-fit:cover">
          <div class="card-body p-4"><h3 class="h6 mb-0 wdw-heading">Alison Belmont</h3><p class="text-primary small fw-semibold mb-2">Graffiti artist</p><p class="small wdw-muted mb-3">Large-scale murals that turn blank walls into landmarks.</p><a href="#" class="btn btn-sm btn-outline-primary rounded-pill">View profile</a></div></article></div>
        <div class="col-md-4"><article class="card wdw-card-sm h-100 border-0 overflow-hidden">
          <img src="https://images.unsplash.com/photo-1414235077428-338989a2e8c0?w=600&h=400&fit=crop&q=80" class="card-img-top" alt="A plated restaurant dish" height="200" style="object-fit:cover">
          <div class="card-body p-4"><span class="badge rounded-pill mb-2 bg-primary-subtle text-primary-emphasis">Culinary</span><h3 class="h6 wdw-heading">Cheat day inspirations</h3><p class="small wdw-muted mb-3">Five plates worth breaking the rules for this weekend.</p><a href="#" class="btn btn-sm btn-outline-primary rounded-pill">Read more</a></div></article></div>
        <div class="col-md-4"><article class="card wdw-card-sm h-100 border-0 overflow-hidden">
          <img src="https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=600&h=400&fit=crop&q=80" class="card-img-top" alt="Sunlight through a forest" height="200" style="object-fit:cover">
          <div class="card-body p-4"><h3 class="h6 mb-0 wdw-heading">Billy Coleman</h3><p class="text-primary small fw-semibold mb-2">Web developer</p><p class="small wdw-muted mb-3">Builds fast, accessible interfaces from quiet corners of the world.</p><a href="#" class="btn btn-sm btn-outline-primary rounded-pill">View profile</a></div></article></div>
      </div>
    </section>

    <section id="tourGallery" aria-labelledby="galTitle">
      <h2 class="h5 wdw-heading mb-3" id="galTitle">Image gallery</h2>
      <div class="wdw-gallery">
        <button type="button" class="wdw-shot tall" data-full="https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=1400&q=80" data-alt="Mountain ridge at sunrise" aria-label="View larger: Mountain ridge at sunrise"><img src="https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=600&q=80" alt="Mountain ridge at sunrise"></button>
        <button type="button" class="wdw-shot " data-full="https://images.unsplash.com/photo-1469474968028-56623f02e42e?w=1400&q=80" data-alt="Misty valley with green hills" aria-label="View larger: Misty valley with green hills"><img src="https://images.unsplash.com/photo-1469474968028-56623f02e42e?w=600&q=80" alt="Misty valley with green hills"></button>
        <button type="button" class="wdw-shot " data-full="https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?w=1400&q=80" data-alt="Sunlit trail through tall trees" aria-label="View larger: Sunlit trail through tall trees"><img src="https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?w=600&q=80" alt="Sunlit trail through tall trees"></button>
        <button type="button" class="wdw-shot wide" data-full="https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?w=1400&q=80" data-alt="Wide view of a foggy forest" aria-label="View larger: Wide view of a foggy forest"><img src="https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?w=600&q=80" alt="Wide view of a foggy forest"></button>
        <button type="button" class="wdw-shot " data-full="https://images.unsplash.com/photo-1501785888041-af3ef285b470?w=1400&q=80" data-alt="Lake surrounded by mountains" aria-label="View larger: Lake surrounded by mountains"><img src="https://images.unsplash.com/photo-1501785888041-af3ef285b470?w=600&q=80" alt="Lake surrounded by mountains"></button>
        <button type="button" class="wdw-shot wide" data-full="https://images.unsplash.com/photo-1518837695005-2083093ee35b?w=1400&q=80" data-alt="Ocean wave breaking on a beach" aria-label="View larger: Ocean wave breaking on a beach"><img src="https://images.unsplash.com/photo-1518837695005-2083093ee35b?w=600&q=80" alt="Ocean wave breaking on a beach"></button>
      </div>
    </section>
  </main>
  <div class="modal fade" id="shotModal" tabindex="-1" aria-label="Image preview" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg"><div class="modal-content border-0 overflow-hidden">
      <button type="button" class="btn-close position-absolute top-0 end-0 m-3 z-1 bg-body rounded-circle p-2" data-bs-dismiss="modal" aria-label="Close"></button>
      <img src="https://images.unsplash.com/photo-1506744038136-46273834b3fb?w=1400&q=80" alt="Mountain ridge at sunrise" id="shotImg" class="img-fluid w-100">
    </div></div>
  </div>
</div>

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.