Snippets Registration

Bootstrap 5 Registration Form with Password Strength

A two-column registration page with a benefits panel, floating-label fields, a live password strength meter and validation.

Bootstrap 5 No jQuery Aug 2019 6.3K views

<section class="wdw-stage">
  <div class="container" style="max-width:1020px">
    <div class="wdw-card overflow-hidden">
      <div class="row g-0">
        <div class="col-lg-5 wdw-aurora p-4 p-md-5 d-flex flex-column justify-content-between rg-side">
          <div class="fw-bold fs-5">Northwind</div>
          <div class="py-4">
            <h2 class="fw-bold display-6 mb-3" style="letter-spacing:-.02em">Create your free account</h2>
            <ul class="list-unstyled mb-0 d-grid gap-3">
              <li class="d-flex gap-2"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="flex-none mt-1"><path d="M20 6 9 17l-5-5"/></svg><span>Unlimited projects, no card required</span></li>
              <li class="d-flex gap-2"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="flex-none mt-1"><path d="M20 6 9 17l-5-5"/></svg><span>Invite your whole team</span></li>
              <li class="d-flex gap-2"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="flex-none mt-1"><path d="M20 6 9 17l-5-5"/></svg><span>Cancel or export your data anytime</span></li>
            </ul>
          </div>
          <p class="small opacity-75 mb-0">Already registered? <a href="#" class="text-white fw-semibold">Log in</a></p>
        </div>
        <div class="col-lg-7">
          <form class="p-4 p-md-5" id="rg-form" novalidate>
            <h3 class="wdw-heading h4 mb-4">Your details</h3>
            <div class="row g-3">
              <div class="col-sm-6"><div class="form-floating"><input class="form-control" id="rg-fn" placeholder="First name" autocomplete="given-name" required><label for="rg-fn">First name</label></div></div>
              <div class="col-sm-6"><div class="form-floating"><input class="form-control" id="rg-ln" placeholder="Last name" autocomplete="family-name"><label for="rg-ln">Last name</label></div></div>
              <div class="col-12"><div class="form-floating"><input type="email" class="form-control" id="rg-em" placeholder="Email" autocomplete="email" required><label for="rg-em">Email</label><div class="invalid-feedback">Enter a valid email address.</div></div></div>
              <div class="col-sm-6"><div class="form-floating"><input type="password" class="form-control" id="rg-pw" placeholder="Password" autocomplete="new-password" minlength="8" required><label for="rg-pw">Password</label><div class="invalid-feedback">At least 8 characters.</div></div></div>
              <div class="col-sm-6"><div class="form-floating"><input type="password" class="form-control" id="rg-pw2" placeholder="Confirm password" autocomplete="new-password" required><label for="rg-pw2">Confirm password</label><div class="invalid-feedback">Passwords do not match.</div></div></div>
              <div class="col-12"><div class="progress" style="height:6px" aria-hidden="true"><div class="progress-bar" id="rg-meter" style="width:0"></div></div><div class="small wdw-muted mt-1" id="rg-hint">Password strength</div></div>
              <div class="col-sm-6"><div class="form-floating"><input type="date" class="form-control" id="rg-dob" placeholder="Date of birth" autocomplete="bday" required><label for="rg-dob">Date of birth</label></div></div>
              <div class="col-sm-6"><div class="form-floating"><input type="tel" class="form-control" id="rg-ph" placeholder="Phone number" autocomplete="tel"><label for="rg-ph">Phone number</label></div></div>
              <div class="col-12">
                <div class="form-check">
                  <input class="form-check-input" type="checkbox" id="rg-terms" required>
                  <label class="form-check-label" for="rg-terms">I agree to the <a href="#" class="fw-semibold link-underline-opacity-0">Terms</a> and <a href="#" class="fw-semibold link-underline-opacity-0">Privacy Policy</a></label>
                </div>
              </div>
              <div class="col-12"><button type="submit" class="btn btn-primary rounded-pill w-100">Create account</button><div class="alert alert-success d-none mt-3 mb-0 py-2" id="rg-ok" role="status">Account created. Check your inbox to confirm.</div></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.