Snippets Form

Bootstrap 5 Registration Form Styles

Four registration form styles in one set: a sign up and log in tab card, a password strength form, a social sign-up with email and a two-step wizard.

Bootstrap 5 No jQuery Nov 2020 1.3K views

<section class="wdw-stage">
  <div class="container" style="max-width: 1100px">
    <div class="text-center mb-4">
      <span class="wdw-eyebrow">Sign-up forms</span>
      <h1 class="wdw-heading h2 mt-1 mb-0">Registration form styles</h1>
    </div>

    <div class="row g-4 align-items-start">
      <!-- Style 1: tabbed -->
      <div class="col-lg-6">
        <div class="wdw-card p-4">
          <span class="wdw-eyebrow d-block mb-3">Style 1 · Sign up / Log in tabs</span>
          <ul class="nav nav-pills nav-fill bg-body-tertiary rounded-pill p-1 mb-4" id="rgTabs" role="tablist">
            <li class="nav-item" role="presentation"><button class="nav-link rounded-pill active" data-bs-toggle="pill" id="rg1-tab-up" data-bs-target="#rg1-up" type="button" role="tab" aria-controls="rg1-up" aria-selected="true">Sign up</button></li>
            <li class="nav-item" role="presentation"><button class="nav-link rounded-pill" data-bs-toggle="pill" id="rg1-tab-in" data-bs-target="#rg1-in" type="button" role="tab" aria-controls="rg1-in" aria-selected="false">Log in</button></li>
          </ul>
          <div class="tab-content">
            <form class="tab-pane fade show active rg-form" id="rg1-up" role="tabpanel" aria-labelledby="rg1-tab-up" novalidate>
              <div class="form-floating mb-3"><input type="text" class="form-control" id="rg1-name" placeholder="Username" required><label for="rg1-name">Username</label></div>
              <div class="form-floating mb-3"><input type="email" class="form-control" id="rg1-mail" placeholder="Email" required><label for="rg1-mail">Email address</label></div>
              <div class="row g-3 mb-3">
                <div class="col-sm-6"><div class="form-floating"><input type="password" class="form-control" id="rg1-pw" placeholder="Password" required minlength="8"><label for="rg1-pw">Password</label></div></div>
                <div class="col-sm-6"><div class="form-floating"><input type="password" class="form-control" id="rg1-pw2" placeholder="Repeat" required data-match="rg1-pw"><label for="rg1-pw2">Repeat password</label></div></div>
              </div>
              <div class="form-check mb-4"><input class="form-check-input" type="checkbox" id="rg1-terms" required><label class="form-check-label small" for="rg1-terms">I agree to the <a href="#" class="link-primary">terms of registration</a></label></div>
              <button class="btn btn-primary rounded-pill w-100" type="submit">Create account</button>
              <p class="rg-msg small text-center mt-3 mb-0" role="status" aria-live="polite"></p>
            </form>
            <form class="tab-pane fade rg-form" id="rg1-in" role="tabpanel" aria-labelledby="rg1-tab-in" novalidate>
              <div class="form-floating mb-3"><input type="email" class="form-control" id="rg1-lmail" placeholder="Email" required><label for="rg1-lmail">Email address</label></div>
              <div class="form-floating mb-3"><input type="password" class="form-control" id="rg1-lpw" placeholder="Password" required><label for="rg1-lpw">Password</label></div>
              <div class="d-flex justify-content-between mb-4 small"><span class="wdw-muted">Welcome back</span><a href="#" class="link-primary fw-semibold">Forgot password?</a></div>
              <button class="btn btn-primary rounded-pill w-100" type="submit">Log in</button>
              <p class="rg-msg small text-center mt-3 mb-0" role="status" aria-live="polite"></p>
            </form>
          </div>
        </div>
      </div>

      <!-- Style 2: classic with strength meter -->
      <div class="col-lg-6">
        <div class="wdw-card p-4">
          <span class="wdw-eyebrow d-block mb-3">Style 2 · Password strength</span>
          <h2 class="h4 wdw-heading mb-1">Create your account</h2>
          <p class="wdw-muted small mb-4">It is free and only takes a minute.</p>
          <form class="rg-form" novalidate>
            <div class="row g-3 mb-3">
              <div class="col-sm-6"><div class="form-floating"><input type="text" class="form-control" id="rg2-first" placeholder="First" required><label for="rg2-first">First name</label></div></div>
              <div class="col-sm-6"><div class="form-floating"><input type="text" class="form-control" id="rg2-last" placeholder="Last" required><label for="rg2-last">Last name</label></div></div>
            </div>
            <div class="form-floating mb-3"><input type="email" class="form-control" id="rg2-mail" placeholder="Email" required><label for="rg2-mail">Email address</label></div>
            <div class="form-floating mb-2"><input type="password" class="form-control" id="rg2-pw" placeholder="Password" required minlength="8" data-strength="rg2-meter"><label for="rg2-pw">Password</label></div>
            <div class="d-flex align-items-center gap-2 mb-3" aria-live="polite">
              <div class="progress flex-grow-1" style="height:8px" role="progressbar" aria-label="Password strength" aria-valuemin="0" aria-valuemax="4" aria-valuenow="0" id="rg2-meter"><div class="progress-bar"></div></div>
              <span class="small wdw-muted rg-strength-label text-nowrap">Use 8+ characters</span>
            </div>
            <div class="form-check mb-4"><input class="form-check-input" type="checkbox" id="rg2-terms" required><label class="form-check-label small" for="rg2-terms">I accept the <a href="#" class="link-primary">Terms</a> and <a href="#" class="link-primary">Privacy Policy</a></label></div>
            <button class="btn btn-primary rounded-pill w-100" type="submit">Register now</button>
            <p class="rg-msg small text-center mt-3 mb-0" role="status" aria-live="polite"></p>
          </form>
          <p class="text-center small wdw-muted mt-3 mb-0">Already have an account? <a href="#" class="link-primary fw-semibold">Sign in</a></p>
        </div>
      </div>

      <!-- Style 3: split aurora -->
      <div class="col-lg-6">
        <div class="wdw-card overflow-hidden">
          <div class="wdw-aurora p-4 p-md-5">
            <span class="wdw-eyebrow mb-3 d-block text-white">Style 3 · Social + email</span>
            <h2 class="h4 fw-bold mb-1">Join 20,000+ designers</h2>
            <p class="small opacity-75 mb-0">Save your work, sync across devices and get early access.</p>
          </div>
          <div class="p-4 p-md-5">
            <div class="row g-2 mb-3">
              <div class="col-6"><button type="button" class="btn bg-body-tertiary border-0 text-body rounded-pill w-100"><svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 .5a11.5 11.5 0 0 0-3.64 22.41c.58.1.79-.25.79-.56v-2c-3.2.7-3.88-1.54-3.88-1.54-.52-1.33-1.28-1.69-1.28-1.69-1.04-.71.08-.7.08-.7 1.15.08 1.76 1.18 1.76 1.18 1.03 1.76 2.69 1.25 3.35.96.1-.75.4-1.25.73-1.54-2.55-.29-5.24-1.28-5.24-5.69 0-1.26.45-2.28 1.18-3.09-.12-.29-.51-1.46.11-3.05 0 0 .97-.31 3.17 1.18a11 11 0 0 1 5.77 0c2.2-1.49 3.17-1.18 3.17-1.18.62 1.59.23 2.76.11 3.05.74.81 1.18 1.83 1.18 3.09 0 4.42-2.69 5.39-5.25 5.68.41.36.78 1.06.78 2.14v3.17c0 .31.21.67.8.56A11.5 11.5 0 0 0 12 .5Z"/></svg>GitHub</button></div>
              <div class="col-6"><button type="button" class="btn bg-body-tertiary border-0 text-body rounded-pill w-100"><svg width="18" height="18" viewBox="0 0 24 24" aria-hidden="true"><path fill="#4285F4" d="M23 12.27c0-.79-.07-1.54-.2-2.27H12v4.51h6.18a5.28 5.28 0 0 1-2.29 3.47v2.88h3.7C21.75 18.87 23 15.8 23 12.27Z"/><path fill="#34A853" d="M12 23.5c3.1 0 5.7-1.03 7.6-2.79l-3.7-2.88c-1.03.69-2.35 1.1-3.9 1.1-3 0-5.53-2.03-6.44-4.75H1.74v2.97A11.5 11.5 0 0 0 12 23.5Z"/><path fill="#FBBC05" d="M5.56 14.18a6.9 6.9 0 0 1 0-4.36V6.85H1.74a11.5 11.5 0 0 0 0 10.3l3.82-2.97Z"/><path fill="#EA4335" d="M12 5.07c1.69 0 3.2.58 4.4 1.72l3.28-3.28A11.04 11.04 0 0 0 12 .5 11.5 11.5 0 0 0 1.74 6.85l3.82 2.97C6.47 7.1 9 5.07 12 5.07Z"/></svg>Google</button></div>
            </div>
            <div class="d-flex align-items-center gap-3 small wdw-muted mb-3"><hr class="flex-grow-1 m-0"><span>or with email</span><hr class="flex-grow-1 m-0"></div>
            <form class="rg-form" novalidate>
              <div class="form-floating mb-3"><input type="email" class="form-control" id="rg3-mail" placeholder="Email" required><label for="rg3-mail">Work email</label></div>
              <div class="form-floating mb-3"><input type="password" class="form-control" id="rg3-pw" placeholder="Password" required minlength="8"><label for="rg3-pw">Password (8+ characters)</label></div>
              <button class="btn btn-primary rounded-pill w-100" type="submit">Sign up free</button>
              <p class="rg-msg small text-center mt-3 mb-0" role="status" aria-live="polite"></p>
            </form>
          </div>
        </div>
      </div>

      <!-- Style 4: two-step wizard -->
      <div class="col-lg-6">
        <div class="wdw-card p-4">
          <span class="wdw-eyebrow d-block mb-3">Style 4 · Two-step wizard</span>
          <div class="d-flex align-items-center gap-2 mb-2 small fw-semibold">
            <span id="rg4-label">Step 1 of 2: Your account</span>
          </div>
          <div class="progress mb-4" style="height:6px" role="progressbar" aria-label="Registration progress" aria-valuemin="0" aria-valuemax="100" aria-valuenow="50" id="rg4-progress"><div class="progress-bar" style="width:50%"></div></div>
          <form id="rg4-form" novalidate>
            <div data-step="1">
              <h2 class="h4 wdw-heading mb-3">Let’s get you started</h2>
              <div class="form-floating mb-3"><input type="email" class="form-control" id="rg4-mail" placeholder="Email" required><label for="rg4-mail">Email address</label></div>
              <div class="form-floating mb-4"><input type="password" class="form-control" id="rg4-pw" placeholder="Password" required minlength="8"><label for="rg4-pw">Password</label></div>
              <button type="button" class="btn btn-primary rounded-pill w-100" id="rg4-next">Continue</button>
            </div>
            <div data-step="2" hidden>
              <h2 class="h4 wdw-heading mb-3">Tell us about you</h2>
              <div class="form-floating mb-3"><input type="text" class="form-control" id="rg4-name" placeholder="Name" required><label for="rg4-name">Full name</label></div>
              <div class="form-floating mb-3"><select class="form-select" id="rg4-role" required><option value="">Choose…</option><option>Designer</option><option>Developer</option><option>Product manager</option><option>Other</option></select><label for="rg4-role">Your role</label></div>
              <div class="form-check mb-4"><input class="form-check-input" type="checkbox" id="rg4-terms" required><label class="form-check-label small" for="rg4-terms">I agree to the <a href="#" class="link-primary">terms of registration</a></label></div>
              <div class="d-flex gap-2"><button type="button" class="btn btn-outline-secondary rounded-pill" id="rg4-back">Back</button><button type="submit" class="btn btn-primary rounded-pill flex-grow-1">Create account</button></div>
            </div>
            <div data-step="done" hidden class="text-center py-3">
              <span class="wdw-icon mb-3"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg></span>
              <h2 class="h4 wdw-heading mb-1">Account created</h2>
              <p class="wdw-muted mb-0" role="status">Check your inbox to confirm your email.</p>
            </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.