Snippets Email

Bootstrap 5 Newsletter Subscribe Banner

A newsletter signup banner with name and email fields and a subscribe button, with inline validation feedback.

Bootstrap 5 No jQuery Jul 2019 2.2K views

<section class="wdw-stage">
  <div class="container" style="max-width: 1040px">
    <div class="wdw-aurora rounded-5 p-4 p-md-5 overflow-hidden shadow-lg">
      <div class="row g-4 g-lg-5 align-items-center position-relative">
        <div class="col-lg-5">
          <span class="badge rounded-pill text-bg-light mb-3">Weekly digest</span>
          <h2 class="fw-bold display-6 mb-2" style="letter-spacing:-.02em">Subscribe to our newsletter</h2>
          <p class="mb-0 opacity-75">Design news, new releases and event invites. One email a week, unsubscribe anytime.</p>
        </div>
        <div class="col-lg-7">
          <form class="nl-form" novalidate>
            <div class="row g-3">
              <div class="col-sm-6">
                <div class="form-floating">
                  <input type="text" class="form-control border-0" id="nlName" placeholder="Your name" autocomplete="name" required>
                  <label for="nlName">Your name</label>
                </div>
              </div>
              <div class="col-sm-6">
                <div class="form-floating">
                  <input type="email" class="form-control border-0" id="nlEmail" placeholder="Email address" autocomplete="email" required>
                  <label for="nlEmail">Email address</label>
                </div>
              </div>
              <div class="col-12">
                <button type="submit" class="btn btn-light rounded-pill w-100 fw-bold">
                  <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m22 2-7 20-4-9-9-4Z"/><path d="M22 2 11 13"/></svg>
                  Subscribe
                </button>
              </div>
              <div class="col-12">
                <p class="small mb-0 opacity-75 nl-status" role="status" aria-live="polite">No spam. We respect your inbox.</p>
              </div>
            </div>
          </form>
        </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.