Snippets Form

Bootstrap 5 Login Form with Facebook and Google Buttons

A login card with a photo header, floating-label fields, remember-me and forgot-password row, and Facebook and Google sign-in buttons. It sits over a dimmed full-bleed photo and works in light and dark themes.

Bootstrap 5 No jQuery May 2020 3.4K views

<section class="wdw-stage login-photo">
  <div class="container" style="max-width: 960px">
    <div class="wdw-card overflow-hidden">
      <div class="row g-0">
        <div class="col-lg-5 d-none d-lg-flex wdw-aurora login-brand p-5 flex-column justify-content-between">
          <span class="wdw-eyebrow text-white-50">Brewline</span>
          <div>
            <p class="login-quote mb-3">Good work starts with a good morning.</p>
            <p class="mb-0 text-white-50">Log in to pick up right where you left off.</p>
          </div>
        </div>
        <form class="col-lg-7 p-4 p-md-5" novalidate>
          <h1 class="h3 wdw-heading mb-1">Log in to your account</h1>
          <p class="wdw-muted mb-4">Welcome back. Enter your details below.</p>

          <div class="form-floating mb-3">
            <input type="text" class="form-control" id="lfUser" placeholder="Email or phone" autocomplete="username">
            <label for="lfUser">Email or phone</label>
          </div>
          <div class="form-floating mb-4">
            <input type="password" class="form-control" id="lfPass" placeholder="Password" autocomplete="current-password">
            <label for="lfPass">Password</label>
          </div>
          <div class="d-flex justify-content-between align-items-center mb-4">
            <div class="form-check mb-0">
              <input class="form-check-input" type="checkbox" id="lfRemember">
              <label class="form-check-label small" for="lfRemember">Remember me</label>
            </div>
            <a href="#" class="small fw-semibold text-decoration-none">Forgot password?</a>
          </div>
          <button type="submit" class="btn btn-primary rounded-pill w-100">Log in</button>
          <div class="d-flex align-items-center gap-3 my-4 text-body-secondary small">
            <hr class="flex-grow-1 m-0"><span>or continue with</span><hr class="flex-grow-1 m-0">
          </div>
          <div class="row g-3">
            <div class="col-6">
              <button type="button" class="btn btn-outline-secondary login-social rounded-pill w-100 d-inline-flex align-items-center justify-content-center gap-2">
                <svg width="18" height="18" viewBox="0 0 24 24" aria-hidden="true"><path fill="#1877F2" d="M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z"/></svg>
                Facebook
              </button>
            </div>
            <div class="col-6">
              <button type="button" class="btn btn-outline-secondary login-social rounded-pill w-100 d-inline-flex align-items-center justify-content-center gap-2">
                <svg width="18" height="18" viewBox="0 0 48 48" aria-hidden="true"><path fill="#EA4335" d="M24 9.5c3.5 0 6.6 1.2 9.1 3.6l6.8-6.8C35.8 2.4 30.3 0 24 0 14.6 0 6.5 5.4 2.6 13.2l7.9 6.1C12.4 13.6 17.7 9.5 24 9.5z"/><path fill="#4285F4" d="M46.5 24.5c0-1.6-.1-3.1-.4-4.5H24v9h12.7c-.6 3-2.3 5.5-4.8 7.2l7.6 5.9c4.4-4.1 7-10.1 7-17.6z"/><path fill="#FBBC05" d="M10.5 28.7a14.5 14.5 0 0 1 0-9.4l-7.9-6.1a24 24 0 0 0 0 21.6l7.9-6.1z"/><path fill="#34A853" d="M24 48c6.5 0 11.9-2.1 15.9-5.8l-7.6-5.9c-2.1 1.4-4.9 2.3-8.3 2.3-6.3 0-11.6-4.1-13.5-9.8l-7.9 6.1C6.5 42.6 14.6 48 24 48z"/></svg>
                Google
              </button>
            </div>
          </div>
          <p class="text-center small wdw-muted mt-4 mb-0">Not a member? <a href="#" class="fw-semibold text-decoration-none">Sign up now</a></p>
        </form>
      </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.