Snippets Animation

Bootstrap 5 Hero Banner with Typewriter Headline

A full-width hero banner over a photo with a typewriter headline that cycles through words, a primary call to action, and a modal that plays an intro video on demand.

Bootstrap 5 No jQuery Nov 2019 2.2K views

<section class="hero-type wdw-aurora d-flex align-items-center">
  <div class="container position-relative py-5">
    <div class="row justify-content-center">
      <div class="col-lg-8 text-center text-white">
        <span class="badge rounded-pill hero-badge mb-4 px-3 py-2">New in 2026</span>
        <h1 class="display-3 fw-bold mb-3" style="letter-spacing:-.03em">Build something<br><span class="visually-hidden"> beautiful, flexible, fast.</span><span class="hero-type-line typewrite" aria-hidden="true" data-period="1800" data-type='["beautiful.","flexible.","fast."]'>beautiful.</span></h1>
        <p class="lead mb-5 mx-auto" style="max-width:34rem;opacity:.85">An extraordinarily flexible UI kit with everything you need to launch your next project.</p>
        <div class="d-flex flex-column flex-sm-row gap-3 justify-content-center">
          <a class="btn btn-primary btn-lg rounded-pill px-4" href="#features">Browse products
            <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg></a>
          <button type="button" class="btn btn-outline-light btn-lg rounded-pill px-4" data-bs-toggle="modal" data-bs-target="#intro-video">
            <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M8 5v14l11-7z"/></svg>Watch intro</button>
        </div>
        <div class="row row-cols-3 g-3 mx-auto mt-5 pt-4 hero-stats" id="features">
          <div class="col"><div class="h2 fw-bold mb-0">120+</div><div class="small opacity-75">UI components</div></div>
          <div class="col"><div class="h2 fw-bold mb-0">40k</div><div class="small opacity-75">Developers</div></div>
          <div class="col"><div class="h2 fw-bold mb-0">4.9/5</div><div class="small opacity-75">Average rating</div></div>
        </div>
      </div>
    </div>
  </div>
  <div class="modal fade" id="intro-video" tabindex="-1" aria-labelledby="intro-video-title" aria-hidden="true">
    <div class="modal-dialog modal-lg modal-dialog-centered">
      <div class="modal-content border-0 rounded-4 overflow-hidden">
        <div class="modal-header">
          <h2 class="modal-title h5" id="intro-video-title">Watch the intro</h2>
          <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
        </div>
        <div class="modal-body p-0">
          <div class="ratio ratio-16x9">
            <iframe data-src="https://www.youtube.com/embed/DDwbjWCgxVM" title="Intro video" allowfullscreen></iframe>
          </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.