Snippets Form

Bootstrap 5 Login Form Styles (4 Modern Designs)

Four modern login layouts in one set: a photo split panel, a minimal floating-label card, a social-first split, and a tabbed login and register card.

Bootstrap 5 No jQuery Feb 2020 2.5K views

<section class="wdw-stage lf-stage">
  <div class="container" style="max-width:980px">
    <div class="d-flex flex-column flex-md-row align-items-md-center justify-content-between gap-3 mb-4">
      <div>
        <span class="wdw-eyebrow">Sign in</span>
        <h2 class="wdw-heading h3 mb-0">Login form styles</h2>
      </div>
      <div class="nav nav-pills lf-switch bg-body rounded-pill p-1 shadow-sm align-self-md-auto align-self-start" role="tablist" aria-label="Login style">
        <button class="nav-link rounded-pill active" id="lf-tab-1" data-bs-toggle="pill" data-bs-target="#lf-1" aria-controls="lf-1" type="button" role="tab" aria-selected="true">Photo split</button>
        <button class="nav-link rounded-pill" id="lf-tab-2" data-bs-toggle="pill" data-bs-target="#lf-2" aria-controls="lf-2" type="button" role="tab" aria-selected="false">Minimal</button>
        <button class="nav-link rounded-pill" id="lf-tab-3" data-bs-toggle="pill" data-bs-target="#lf-3" aria-controls="lf-3" type="button" role="tab" aria-selected="false">Social first</button>
        <button class="nav-link rounded-pill" id="lf-tab-4" data-bs-toggle="pill" data-bs-target="#lf-4" aria-controls="lf-4" type="button" role="tab" aria-selected="false">Tabbed</button>
      </div>
    </div>

    <div class="tab-content">
      <!-- 1 Photo split -->
      <div class="tab-pane fade show active" id="lf-1" role="tabpanel" aria-labelledby="lf-tab-1" tabindex="0">
        <div class="wdw-card overflow-hidden">
          <div class="row g-0">
            <div class="col-md-5 p-4 p-md-5 d-flex flex-column justify-content-center">
              <span class="wdw-icon mb-4"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4.5" width="18" height="16" rx="3"/><path d="M8 2.5v4M16 2.5v4M3 10h18"/></svg></span>
              <h3 class="wdw-heading h3">Plan your day</h3>
              <p class="wdw-muted mb-4">Sign in to see today's schedule.</p>
              <form novalidate>
                <div class="mb-3"><label class="form-label small fw-semibold" for="lf1-user">Username</label><input type="text" id="lf1-user" class="form-control" autocomplete="username" placeholder="alex.morgan"></div>
                <div class="mb-4"><label class="form-label small fw-semibold" for="lf1-pass">Password</label><input type="password" id="lf1-pass" class="form-control" autocomplete="current-password" placeholder="Your password"></div>
                <button type="submit" class="btn btn-primary rounded-pill w-100">Enter</button>
              </form>
            </div>
            <div class="col-md-7 d-none d-md-flex wdw-aurora lf-hero flex-column justify-content-end p-5">
              <div class="lf-agenda">
                <p class="small text-uppercase fw-bold opacity-75 mb-3" style="letter-spacing:.08em">Today</p>
                <div class="lf-event"><span class="lf-time">09:30</span><span>Design review</span></div>
                <div class="lf-event"><span class="lf-time">11:00</span><span>Sprint planning</span></div>
                <div class="lf-event"><span class="lf-time">14:15</span><span>Client call</span></div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <!-- 2 Minimal -->
      <div class="tab-pane fade" id="lf-2" role="tabpanel" aria-labelledby="lf-tab-2" tabindex="0">
        <div class="lf-soft rounded-4 p-3 p-md-5"><div class="wdw-card mx-auto p-4 p-md-5" style="max-width:420px">
          <div class="text-center mb-4">
            <span class="lf-mark mb-3"><svg width="26" height="26" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 11l18-8-8 18-2-8-8-2z"/></svg></span>
            <h3 class="wdw-heading h4 mb-1">Welcome back</h3>
            <p class="wdw-muted small mb-0">Log in to continue to your workspace.</p>
          </div>
          <form novalidate>
            <div class="form-floating mb-3"><input type="email" class="form-control" id="lf2-email" placeholder="Email" autocomplete="email"><label for="lf2-email">Email</label></div>
            <div class="form-floating mb-4"><input type="password" class="form-control" id="lf2-pass" placeholder="Password" autocomplete="current-password"><label for="lf2-pass">Password</label></div>
            <button type="submit" class="btn btn-primary rounded-pill w-100">Log in</button>
          </form>
          <p class="text-center small mt-4 mb-0"><a href="#" class="text-decoration-none">Forgot your email or password?</a></p>
        </div></div>
      </div>

      <!-- 3 Social first -->
      <div class="tab-pane fade" id="lf-3" role="tabpanel" aria-labelledby="lf-tab-3" tabindex="0">
        <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-center">
              <h3 class="fw-bold h4 mb-2">Quick access</h3>
              <p class="opacity-75 small mb-4">Continue with a connected account.</p>
              <div class="d-grid gap-2">
                <button type="button" class="btn btn-light rounded-pill"><svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M12 .5a11.5 11.5 0 00-3.64 22.41c.58.1.79-.25.79-.56v-2c-3.2.7-3.88-1.37-3.88-1.37-.52-1.33-1.28-1.68-1.28-1.68-1.04-.71.08-.7.08-.7 1.15.08 1.76 1.19 1.76 1.19 1.03 1.76 2.69 1.25 3.35.96.1-.74.4-1.25.73-1.54-2.55-.29-5.24-1.28-5.24-5.69 0-1.26.45-2.28 1.19-3.09-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.17 1.18a11 11 0 015.77 0c2.2-1.49 3.17-1.18 3.17-1.18.63 1.59.23 2.76.11 3.05.74.81 1.19 1.83 1.19 3.09 0 4.42-2.69 5.39-5.25 5.68.41.35.78 1.06.78 2.14v3.17c0 .31.21.67.8.56A11.5 11.5 0 0012 .5z"/></svg>Continue with GitHub</button>
                <button type="button" class="btn btn-light rounded-pill"><svg width="18" height="18" viewBox="0 0 24 24" aria-hidden="true"><path fill="#4285F4" d="M23.5 12.27c0-.85-.08-1.67-.22-2.45H12v4.64h6.46a5.52 5.52 0 01-2.4 3.62v3h3.88c2.27-2.09 3.56-5.17 3.56-8.81z"/><path fill="#34A853" d="M12 24c3.24 0 5.96-1.07 7.94-2.91l-3.88-3c-1.08.72-2.45 1.15-4.06 1.15-3.12 0-5.77-2.11-6.71-4.94H1.29v3.1A12 12 0 0012 24z"/><path fill="#FBBC05" d="M5.29 14.3a7.2 7.2 0 010-4.6v-3.1H1.29a12 12 0 000 10.8l4-3.1z"/><path fill="#EA4335" d="M12 4.76c1.76 0 3.34.61 4.58 1.8l3.43-3.43C17.95 1.19 15.23 0 12 0A12 12 0 001.29 6.6l4 3.1C6.23 6.87 8.88 4.76 12 4.76z"/></svg>Continue with Google</button>
              </div>
            </div>
            <div class="col-md-7 p-4 p-md-5">
              <h3 class="wdw-heading h4 mb-1">Log in to your account</h3>
              <p class="wdw-muted small mb-4">New here? <a href="#" class="fw-semibold text-decoration-none">Sign up free</a></p>
              <form novalidate>
                <div class="mb-3"><label class="form-label small fw-semibold" for="lf3-email">Email address</label><input type="email" id="lf3-email" class="form-control" autocomplete="email"></div>
                <div class="mb-3"><label class="form-label small fw-semibold" for="lf3-pass">Password</label><input type="password" id="lf3-pass" class="form-control" autocomplete="current-password"></div>
                <div class="d-flex justify-content-between align-items-center mb-4">
                  <div class="form-check"><input class="form-check-input" type="checkbox" id="lf3-rem"><label class="form-check-label small" for="lf3-rem">Remember me</label></div>
                  <a href="#" class="small text-decoration-none">Forgot password?</a>
                </div>
                <button type="submit" class="btn btn-primary rounded-pill w-100">Log in with email</button>
              </form>
            </div>
          </div>
        </div>
      </div>

      <!-- 4 Tabbed -->
      <div class="tab-pane fade" id="lf-4" role="tabpanel" aria-labelledby="lf-tab-4" tabindex="0">
        <div class="wdw-card mx-auto overflow-hidden" style="max-width:460px">
          <div class="wdw-aurora p-4 text-center">
            <h3 class="fw-bold h5 mb-1">Get more things done</h3>
            <p class="small opacity-75 mb-0">Access the most powerful tool in the design industry.</p>
          </div>
          <div class="p-4 p-md-5">
            <div class="nav nav-pills nav-fill lf-inner bg-body-tertiary rounded-pill p-1 mb-4" role="tablist" aria-label="Login or register">
              <button class="nav-link rounded-pill active" id="lf4-tab-login" data-bs-toggle="pill" data-bs-target="#lf4-login" aria-controls="lf4-login" type="button" role="tab" aria-selected="true">Login</button>
              <button class="nav-link rounded-pill" id="lf4-tab-reg" data-bs-toggle="pill" data-bs-target="#lf4-reg" aria-controls="lf4-reg" type="button" role="tab" aria-selected="false">Register</button>
            </div>
            <div class="tab-content">
              <div class="tab-pane fade show active" id="lf4-login" role="tabpanel" aria-labelledby="lf4-tab-login">
                <form novalidate>
                  <div class="alert alert-info small py-2" role="status">Please fill in the following information.</div>
                  <div class="mb-3"><label class="form-label small fw-semibold" for="lf4-email">Email</label><input type="email" id="lf4-email" class="form-control" autocomplete="email"></div>
                  <div class="mb-2"><label class="form-label small fw-semibold" for="lf4-pass">Password</label><input type="password" id="lf4-pass" class="form-control" autocomplete="current-password"></div>
                  <p class="small mb-4"><a href="#" class="text-decoration-none">Forgot password?</a></p>
                  <button type="submit" class="btn btn-primary rounded-pill w-100">Submit</button>
                </form>
              </div>
              <div class="tab-pane fade" id="lf4-reg" role="tabpanel" aria-labelledby="lf4-tab-reg">
                <form novalidate>
                  <div class="mb-3"><label class="form-label small fw-semibold" for="lf4-name">Full name</label><input type="text" id="lf4-name" class="form-control" autocomplete="name"></div>
                  <div class="mb-3"><label class="form-label small fw-semibold" for="lf4-remail">Email</label><input type="email" id="lf4-remail" class="form-control" autocomplete="email"></div>
                  <div class="mb-4"><label class="form-label small fw-semibold" for="lf4-rpass">Password</label><input type="password" id="lf4-rpass" class="form-control" autocomplete="new-password"></div>
                  <button type="submit" class="btn btn-primary rounded-pill w-100">Create account</button>
                </form>
              </div>
            </div>
          </div>
        </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.