Snippets Form

Bootstrap 5 Registration Form with Password Strength

A clean sign-up card pairing a brand panel with a floating-label registration form, a password visibility toggle and a live strength meter.

Bootstrap 5 No jQuery Nov 2020 2.8K views

<section class="wdw-stage">
  <div class="container" style="max-width: 880px;">
    <div class="wdw-card overflow-hidden">
      <div class="row g-0">
        <div class="col-md-5 wdw-aurora p-4 p-md-5 d-flex flex-column justify-content-between gap-4 reg-brand">
          <span class="reg-logo" aria-hidden="true">
            <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3l2.4 5.6L20 11l-5.6 2.4L12 19l-2.4-5.6L4 11l5.6-2.4z"/></svg>
          </span>
          <div>
            <h2 class="h3 fw-bold mb-2">Start your free workspace</h2>
            <p class="mb-0 opacity-75">Join 12,000 teams planning, shipping and celebrating together. No credit card needed.</p>
          </div>
        </div>
        <div class="col-md-7 p-4 p-md-5">
          <span class="wdw-eyebrow">New account</span>
          <h1 class="h3 wdw-heading mt-1 mb-4">Create your account</h1>
          <form class="d-grid gap-3" id="regForm" novalidate>
            <div class="form-floating">
              <input type="text" class="form-control" id="regName" placeholder="Full name" autocomplete="name" required>
              <label for="regName">Full name</label>
              <div class="invalid-feedback">Please enter your name.</div>
            </div>
            <div class="form-floating">
              <input type="email" class="form-control" id="regEmail" placeholder="Email address" autocomplete="email" required>
              <label for="regEmail">Email address</label>
              <div class="invalid-feedback">Enter a valid email address.</div>
            </div>
            <div class="row g-3">
              <div class="col-sm-6">
                <div class="form-floating position-relative">
                  <input type="password" class="form-control pe-5" id="regPass" placeholder="Password" autocomplete="new-password" minlength="8" required>
                  <label for="regPass">Password</label>
                  <button type="button" class="btn btn-link reg-eye text-body-secondary" data-reg-toggle aria-label="Show password" aria-pressed="false">
                    <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z"/><circle cx="12" cy="12" r="3"/></svg>
                  </button>
                  <div class="invalid-feedback">At least 8 characters.</div>
                </div>
              </div>
              <div class="col-sm-6">
                <div class="form-floating">
                  <input type="tel" class="form-control" id="regPhone" placeholder="Phone number" autocomplete="tel">
                  <label for="regPhone">Phone (optional)</label>
                </div>
              </div>
            </div>
            <div class="progress" style="height:6px" role="progressbar" aria-label="Password strength" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" id="regMeter">
              <div class="progress-bar" style="width:0"></div>
            </div>
            <div class="form-check">
              <input class="form-check-input" type="checkbox" id="regTerms" required>
              <label class="form-check-label small wdw-muted" for="regTerms">I agree to the <a href="#">Terms</a> and <a href="#">Privacy Policy</a></label>
            </div>
            <button type="submit" class="btn btn-primary rounded-pill">Create account
              <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="M5 12h14M13 6l6 6-6 6"/></svg>
            </button>
            <p class="text-center small wdw-muted mb-0">Already registered? <a href="#" class="fw-semibold">Sign in</a></p>
          </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.