Snippets Form

Bootstrap 5 Signup Form with Image on Left

A two-column sign-up form with a full-height photo, floating-label fields, a show/hide password toggle with strength meter, and terms checkbox with validation.

Bootstrap 5 Bootstrap 6 No jQuery Aug 2020 10K views

<section class="wdw-stage">
  <div class="container" style="max-width:980px">
    <div class="wdw-card overflow-hidden">
      <div class="row g-0">
        <div class="col-lg-5 d-none d-lg-block su-photo position-relative">
          <img src="https://images.unsplash.com/photo-1441974231531-c6227db76b6e?auto=format&fit=crop&w=900&q=70" alt="Sunlight falling through tall forest trees">
          <div class="su-scrim position-absolute bottom-0 start-0 end-0 p-4 text-white">
            <p class="h5 fw-bold mb-1">Grow something good.</p>
            <p class="small mb-0 opacity-75">Join 20,000 makers building in the open.</p>
          </div>
        </div>
        <div class="col-lg-7">
          <form class="p-4 p-md-5" id="signup-form" novalidate>
            <span class="wdw-eyebrow">Get started</span>
            <h1 class="h2 wdw-heading mb-1">Create your account</h1>
            <p class="wdw-muted mb-4">Free for 14 days. No credit card needed.</p>
            <div class="form-floating mb-3">
              <input type="email" class="form-control" id="su-email" placeholder="Email" autocomplete="email" required>
              <label for="su-email">Email address</label>
            </div>
            <div class="mb-3">
              <div class="input-group su-pass">
                <div class="form-floating flex-grow-1">
                  <input type="password" class="form-control" id="su-pass" placeholder="Password" autocomplete="new-password" required minlength="8">
                  <label for="su-pass">Password</label>
                </div>
                <button class="btn btn-outline-secondary" type="button" id="su-toggle" aria-label="Show password" aria-pressed="false">Show</button>
              </div>
              <div class="progress mt-2" style="height:.3rem" aria-hidden="true"><div class="progress-bar" id="su-meter" style="width:0"></div></div>
              <div class="form-text" id="su-hint" aria-live="polite">Use 8+ characters with a mix of letters and numbers.</div>
            </div>
            <div class="form-floating mb-3">
              <input type="password" class="form-control" id="su-pass2" placeholder="Repeat password" autocomplete="new-password" required>
              <label for="su-pass2">Repeat password</label>
              <div class="invalid-feedback" id="su-match">Passwords do not match.</div>
            </div>
            <div class="form-check mb-4">
              <input class="form-check-input" type="checkbox" id="su-terms" required>
              <label class="form-check-label small" for="su-terms">I agree to the <a href="#">license terms</a> and privacy policy.</label>
            </div>
            <button type="submit" class="btn btn-primary rounded-pill w-100">Sign up</button>
            <div class="small text-center mt-3" role="status" id="su-status"></div>
            <p class="small wdw-muted text-center mt-4 mb-0">Already have an account? <a href="#" class="fw-semibold text-decoration-none">Log in</a></p>
          </form>
        </div>
      </div>
    </div>
  </div>
</section>

Built on Bootstrap 6.0.0-alpha.1 (ES modules, no jQuery). Load Bootstrap through an import map and run the JavaScript as type="module" — the downloaded file is already set up that way. Alpha releases can still change class names.

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.