Snippets Animation

Bootstrap 5 Page Header with Section Transitions

A portfolio page header with a pill navigation that wipes the background colour from the clicked point and slides in new content for each section.

Bootstrap 5 No jQuery Feb 2020 3.3K views

<section class="wdw-stage">
  <div class="container" style="max-width:1000px">
    <header class="ph wdw-card overflow-hidden position-relative" id="pageHeader" data-section="bio">
      <div class="ph-bg ph-bg-bio wdw-aurora is-active" aria-hidden="true"></div>
      <div class="ph-bg ph-bg-projects" aria-hidden="true"></div>
      <div class="ph-bg ph-bg-find wdw-aurora" aria-hidden="true"></div>

      <div class="ph-inner position-relative p-4 p-md-5">
        <div class="d-flex flex-column flex-sm-row align-items-sm-center justify-content-between gap-3 mb-5">
          <span class="fw-bold d-inline-flex align-items-center gap-2">
            <span class="ph-dot"></span>Mara Lindqvist
          </span>
          <nav aria-label="Page sections">
            <div class="ph-tabs nav nav-pills rounded-pill p-1 gap-1" role="tablist">
              <button class="nav-link rounded-pill active" id="tab-bio" role="tab" type="button" aria-selected="true" aria-controls="panel-bio" data-section="bio">Bio</button>
              <button class="nav-link rounded-pill" id="tab-projects" role="tab" type="button" aria-selected="false" aria-controls="panel-projects" data-section="projects" tabindex="-1">Projects</button>
              <button class="nav-link rounded-pill" id="tab-find" role="tab" type="button" aria-selected="false" aria-controls="panel-find" data-section="find" tabindex="-1">Find me</button>
            </div>
          </nav>
        </div>

        <div class="ph-panels">
          <div class="ph-panel is-active" id="panel-bio" role="tabpanel" aria-labelledby="tab-bio">
            <span class="ph-eyebrow">Bio</span>
            <h1 class="display-4 fw-bolder mb-3">Hi, I’m Mara. I design calm, useful interfaces.</h1>
            <p class="fs-5 ph-lead mb-4">Product designer based in Lisbon, ten years across fintech, health and open-source tools. I care about small details and fast load times.</p>
            <div class="d-flex flex-wrap gap-2"><button type="button" class="btn ph-btn rounded-pill px-4" data-go="projects">See my work</button></div>
          </div>
          <div class="ph-panel" id="panel-projects" role="tabpanel" aria-labelledby="tab-projects" hidden>
            <span class="ph-eyebrow">Projects</span>
            <h1 class="display-4 fw-bolder mb-3">Three recent projects worth a look.</h1>
            <ul class="list-unstyled fs-5 ph-lead mb-4 d-grid gap-2">
              <li><strong>Ledgerly</strong> – a budgeting app redesign, +34% retention</li>
              <li><strong>Pulse</strong> – a patient dashboard used in 40 clinics</li>
              <li><strong>Trellis UI</strong> – an open-source component kit</li>
            </ul>
            <button type="button" class="btn ph-btn rounded-pill px-4" data-go="find">Get in touch</button>
          </div>
          <div class="ph-panel" id="panel-find" role="tabpanel" aria-labelledby="tab-find" hidden>
            <span class="ph-eyebrow">Find me</span>
            <h1 class="display-4 fw-bolder mb-3">Let’s talk about your next project.</h1>
            <p class="fs-5 ph-lead mb-4">Currently booking for spring. The fastest way to reach me is a short email with a few lines about what you’re building.</p>
            <div class="d-flex flex-wrap gap-2"><a class="btn ph-btn rounded-pill px-4" href="#">[email protected]</a><a class="btn ph-btn-ghost rounded-pill px-4" href="#">Book a call</a></div>
          </div>
        </div>

        <div class="ph-foot d-flex align-items-center gap-3 mt-5" aria-hidden="true">
          <span class="ph-step fw-bold" id="phStep">01 / 03</span>
          <span class="ph-bars d-flex gap-1" id="phBars"><i class="on"></i><i></i><i></i></span>
          <span class="ph-next ms-auto small fw-semibold" id="phNext">Next: Projects →</span>
        </div>
      </div>
    </header>
  </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.