Bootstrap 5 Login and Sign Up Form with Tabs
A combined sign-in and registration card with pill tabs, a brand panel whose message changes with the tab, password reveal and social sign-in buttons.
<section class="lg-section wdw-stage">
<div class="container" style="max-width:960px">
<div class="wdw-card overflow-hidden">
<div class="row g-0">
<div class="col-md-5 lg-brand wdw-aurora p-4 p-lg-5 d-flex flex-column justify-content-between">
<div class="d-flex align-items-center gap-2 fw-bold"><span class="lg-mark rounded-3 d-inline-flex align-items-center justify-content-center" aria-hidden="true"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="m5 12 5 5L20 7"/></svg></span>Tasklane</div>
<div class="my-4">
<h2 class="display-6 fw-bold mb-3" id="lgHeadline">Welcome back</h2>
<p class="mb-0" id="lgCopy" style="color:rgba(255,255,255,.85)">Sign in to pick up right where you left off.</p>
<ul class="list-unstyled small d-grid gap-2 mt-4 mb-0" style="color:rgba(255,255,255,.9)">
<li class="d-flex gap-2 align-items-center"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 5 5L20 7"/></svg>Unlimited boards and projects</li>
<li class="d-flex gap-2 align-items-center"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 5 5L20 7"/></svg>Sprint planning and reports</li>
<li class="d-flex gap-2 align-items-center"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12 5 5L20 7"/></svg>Integrations with the tools you use</li>
</ul>
</div>
<figure class="lg-quote rounded-4 p-3 mb-0">
<blockquote class="mb-3 text-white">"We moved our whole sprint process into Tasklane in an afternoon."</blockquote>
<figcaption class="d-flex align-items-center gap-2 small"><img src="https://i.pravatar.cc/64?img=12" width="32" height="32" class="rounded-circle" alt=""><span class="lh-sm"><span class="fw-semibold d-block">Daniel Ortiz</span><span class="d-block" style="color:rgba(255,255,255,.8)">Product lead, Fieldly</span></span></figcaption>
</figure>
</div>
<div class="col-md-7 p-4 p-lg-5 bg-body">
<ul class="nav nav-pills nav-fill bg-body-tertiary border rounded-pill p-1 mb-4" id="lgTabs" role="tablist">
<li class="nav-item" role="presentation"><button class="nav-link active rounded-pill" id="lg-in-tab" data-bs-toggle="pill" data-bs-target="#lg-in" type="button" role="tab" aria-controls="lg-in" aria-selected="true" data-headline="Welcome back" data-copy="Sign in to pick up right where you left off.">Sign in</button></li>
<li class="nav-item" role="presentation"><button class="nav-link rounded-pill" id="lg-up-tab" data-bs-toggle="pill" data-bs-target="#lg-up" type="button" role="tab" aria-controls="lg-up" aria-selected="false" data-headline="Create your account" data-copy="Free for 14 days. No credit card required.">Create account</button></li>
</ul>
<div class="tab-content">
<div class="tab-pane fade show active" id="lg-in" role="tabpanel" aria-labelledby="lg-in-tab" tabindex="0">
<form class="lg-form" novalidate>
<div class="form-floating mb-3"><input type="email" class="form-control rounded-3" id="lgEmail" placeholder="Email" required><label for="lgEmail">Email address</label></div>
<div class="form-floating position-relative mb-3 lg-pw"><input type="password" class="form-control rounded-3" id="lgPass" placeholder="Password" required><label for="lgPass">Password</label><button class="lg-toggle btn btn-link text-body-secondary p-0" type="button" data-lg-toggle="#lgPass" aria-label="Show password"><svg class="lg-eye" 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"><path d="M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/></svg><svg class="lg-eye-off d-none" 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"><path d="M17.9 17.9A10.4 10.4 0 0 1 12 19C5.6 19 2 12 2 12a18 18 0 0 1 4.1-5M9.9 5.2A9.7 9.7 0 0 1 12 5c6.4 0 10 7 10 7a18 18 0 0 1-2.2 3.2M1 1l22 22M9.9 9.9a3 3 0 0 0 4.2 4.2"/></svg></button></div>
<div class="d-flex justify-content-between align-items-center mb-4">
<div class="form-check lg-check"><input class="form-check-input" type="checkbox" id="lgRemember"><label class="form-check-label" for="lgRemember">Remember me</label></div>
<a href="#" class="small link-underline-opacity-0 link-underline-opacity-100-hover">Forgot password?</a>
</div>
<button type="submit" class="btn btn-primary w-100 rounded-pill">Sign in</button>
</form>
</div>
<div class="tab-pane fade" id="lg-up" role="tabpanel" aria-labelledby="lg-up-tab" tabindex="0">
<form class="lg-form" novalidate>
<div class="form-floating mb-3"><input type="text" class="form-control rounded-3" id="lgName" placeholder="Name" required><label for="lgName">Full name</label></div>
<div class="form-floating mb-3"><input type="email" class="form-control rounded-3" id="lgEmail2" placeholder="Email" required><label for="lgEmail2">Email address</label></div>
<div class="form-floating position-relative mb-3 lg-pw"><input type="password" class="form-control rounded-3" id="lgPass2" placeholder="Password" minlength="8" required><label for="lgPass2">Password (8+ characters)</label><button class="lg-toggle btn btn-link text-body-secondary p-0" type="button" data-lg-toggle="#lgPass2" aria-label="Show password"><svg class="lg-eye" 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"><path d="M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/></svg><svg class="lg-eye-off d-none" 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"><path d="M17.9 17.9A10.4 10.4 0 0 1 12 19C5.6 19 2 12 2 12a18 18 0 0 1 4.1-5M9.9 5.2A9.7 9.7 0 0 1 12 5c6.4 0 10 7 10 7a18 18 0 0 1-2.2 3.2M1 1l22 22M9.9 9.9a3 3 0 0 0 4.2 4.2"/></svg></button></div>
<div class="form-check lg-check mb-4"><input class="form-check-input" type="checkbox" id="lgTerms" required><label class="form-check-label" for="lgTerms">I agree to the Terms and Privacy Policy</label></div>
<button type="submit" class="btn btn-primary w-100 rounded-pill">Create account</button>
</form>
</div>
</div>
<div class="d-flex align-items-center gap-3 text-body-secondary small my-4"><hr class="flex-grow-1 m-0"><span>or continue with</span><hr class="flex-grow-1 m-0"></div>
<div class="row g-2">
<div class="col-6"><button type="button" class="btn lg-social w-100 rounded-3 py-2"><svg width="18" height="18" viewBox="0 0 24 24" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" d="M19.2 7.2A8.5 8.5 0 1 0 20.5 12H12"/></svg>Google</button></div>
<div class="col-6"><button type="button" class="btn lg-social w-100 rounded-3 py-2"><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.6 22.4c.6.1.8-.3.8-.6v-2c-3.2.7-3.9-1.5-3.9-1.5-.5-1.3-1.3-1.7-1.3-1.7-1-.7.1-.7.1-.7 1.2.1 1.8 1.2 1.8 1.2 1 1.8 2.8 1.3 3.4 1 .1-.8.4-1.3.7-1.6-2.6-.3-5.3-1.3-5.3-5.7 0-1.3.5-2.3 1.2-3.1-.1-.3-.5-1.5.1-3.1 0 0 1-.3 3.2 1.2a11 11 0 0 1 5.8 0c2.2-1.5 3.2-1.2 3.2-1.2.6 1.6.2 2.8.1 3.1.8.8 1.2 1.9 1.2 3.1 0 4.4-2.7 5.4-5.3 5.7.4.4.8 1.1.8 2.2v3.2c0 .3.2.7.8.6A11.5 11.5 0 0 0 12 .5z"/></svg>GitHub</button></div>
</div>
<p class="small text-success text-center mt-3 mb-0 d-none" id="lgOk" role="status">Success! Redirecting to your dashboard...</p>
</div>
</div>
</div>
</div>
</section>
/* Web Designer Wall library style — shared base for every Bootstrap 5 snippet.
Indigo accent, Plus Jakarta Sans, soft cards, pill buttons. Works in light and dark. */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");
:root,
[data-bs-theme="light"] {
--wdw-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--bs-body-font-family: var(--wdw-font);
--bs-primary: #4f46e5;
--bs-primary-rgb: 79, 70, 229;
--bs-primary-text-emphasis: #3730a3;
--bs-primary-bg-subtle: #eef2ff;
--bs-primary-border-subtle: #c7d2fe;
--bs-link-color: #4f46e5;
--bs-link-color-rgb: 79, 70, 229;
--bs-link-hover-color: #4338ca;
--bs-link-hover-color-rgb: 67, 56, 202;
--bs-focus-ring-color: rgba(79, 70, 229, 0.25);
--bs-border-radius: 0.75rem;
--bs-border-radius-lg: 1rem;
--bs-border-radius-xl: 1.25rem;
--wdw-radius-card: 1.25rem;
--wdw-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 16px 40px -16px rgba(16, 24, 40, 0.22);
--wdw-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 12px -4px rgba(16, 24, 40, 0.12);
--wdw-stage: #f5f6fb;
}
[data-bs-theme="dark"] {
--bs-primary: #818cf8;
--bs-primary-rgb: 129, 140, 248;
--bs-primary-text-emphasis: #c7d2fe;
--bs-primary-bg-subtle: rgba(129, 140, 248, 0.14);
--bs-primary-border-subtle: rgba(129, 140, 248, 0.35);
--bs-link-color: #a5b4fc;
--bs-link-color-rgb: 165, 180, 252;
--bs-link-hover-color: #c7d2fe;
--bs-link-hover-color-rgb: 199, 210, 254;
--bs-focus-ring-color: rgba(129, 140, 248, 0.35);
--wdw-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.7);
--wdw-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px -4px rgba(0, 0, 0, 0.5);
--wdw-stage: #0f1117;
}
body { font-family: var(--wdw-font); -webkit-font-smoothing: antialiased; }
/* Bootstrap compiles its blue into these components; point them at the accent. */
.btn-primary {
--bs-btn-bg: var(--bs-primary); --bs-btn-border-color: var(--bs-primary);
--bs-btn-hover-bg: #4338ca; --bs-btn-hover-border-color: #4338ca;
--bs-btn-active-bg: #3730a3; --bs-btn-active-border-color: #3730a3;
--bs-btn-disabled-bg: var(--bs-primary); --bs-btn-disabled-border-color: var(--bs-primary);
--bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #0f1117; --bs-btn-hover-bg: #a5b4fc; --bs-btn-hover-border-color: #a5b4fc; --bs-btn-hover-color: #0f1117; --bs-btn-active-color: #0f1117; }
.btn-outline-primary {
--bs-btn-color: var(--bs-primary); --bs-btn-border-color: var(--bs-primary);
--bs-btn-hover-bg: var(--bs-primary); --bs-btn-hover-border-color: var(--bs-primary);
--bs-btn-active-bg: var(--bs-primary); --bs-btn-active-border-color: var(--bs-primary);
--bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
.btn { --bs-btn-font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-sm { min-height: 36px; }
.form-control, .form-select { min-height: 44px; border-radius: .75rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: rgba(var(--bs-primary-rgb), .6); box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.form-check-input:checked { background-color: var(--bs-primary); border-color: var(--bs-primary); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--bs-primary); }
.nav { --bs-nav-link-color: var(--bs-secondary-color); --bs-nav-link-hover-color: var(--bs-emphasis-color); }
.pagination { --bs-pagination-active-bg: var(--bs-primary); --bs-pagination-active-border-color: var(--bs-primary); --bs-pagination-color: var(--bs-body-color); --bs-pagination-focus-box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.progress, .progress-stacked { --bs-progress-bar-bg: var(--bs-primary); }
.list-group { --bs-list-group-active-bg: var(--bs-primary); --bs-list-group-active-border-color: var(--bs-primary); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--bs-primary); border-radius: .875rem; box-shadow: var(--wdw-shadow-sm); }
.accordion { --bs-accordion-active-bg: var(--bs-primary-bg-subtle); --bs-accordion-active-color: var(--bs-primary-text-emphasis); --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.badge { font-weight: 600; }
/* Library building blocks — use these instead of re-inventing them per snippet. */
.wdw-stage { min-height: 100vh; display: flex; align-items: center; background: var(--wdw-stage); padding-block: 3rem; }
.wdw-card { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: var(--wdw-radius-card); box-shadow: var(--wdw-shadow); }
.wdw-card-sm { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: 1rem; box-shadow: var(--wdw-shadow-sm); }
.wdw-aurora { position: relative; color: #fff; background: radial-gradient(60% 55% at 100% 0, #818cf8 0, transparent 70%), radial-gradient(65% 60% at 0 100%, #ec4899 0, transparent 65%), #1e1b4b; }
.wdw-eyebrow { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bs-primary); }
.wdw-heading { font-weight: 800; letter-spacing: -.02em; color: var(--bs-emphasis-color); }
.wdw-muted { color: var(--bs-secondary-color); }
.wdw-icon { width: 2.75rem; height: 2.75rem; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: .875rem; background: var(--bs-primary-bg-subtle); color: var(--bs-primary); }
/* Component */
.lg-mark { width: 30px; height: 30px; background: rgba(255,255,255,.22); }
#lgTabs .nav-link { color: var(--bs-secondary-color); font-weight: 600; font-size: 1rem; padding: .6rem 1rem; }
#lgTabs .nav-link.active { background: var(--bs-body-bg); color: var(--bs-emphasis-color); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.lg-section a { text-decoration: none; }
.lg-section .form-control, .lg-section .form-check-input { border-color: var(--bs-border-color); }
.lg-pw .form-control { padding-right: 3rem; }
.lg-toggle { position: absolute; top: 50%; right: .5rem; transform: translateY(-50%); z-index: 4; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: .5rem; }
.lg-toggle:hover { color: var(--bs-emphasis-color) !important; }
.lg-quote { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); }
.lg-social { border: 1px solid var(--bs-border-color); color: var(--bs-body-color); background: var(--bs-body-bg); display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 44px; font-weight: 500; }
.lg-social:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.lg-check { min-height: 44px; display: flex; align-items: center; gap: .6rem; padding-left: 0; font-size: 1rem; }
.lg-check .form-check-input { float: none; margin: 0; width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.lg-check .form-check-label { padding: .6rem 0; }
.lg-check .form-check-input:checked { border-color: var(--bs-primary); }
.lg-section .form-control:focus, .lg-section .form-check-input:focus { border-color: rgba(var(--bs-primary-rgb), .6); }
function initAuthTabs() {
var tabs = document.querySelectorAll('#lgTabs [data-bs-toggle="pill"]');
var head = document.getElementById('lgHeadline');
var copy = document.getElementById('lgCopy');
if (!tabs.length || !head) return;
tabs.forEach(function (t) {
t.addEventListener('shown.bs.tab', function () {
head.textContent = t.dataset.headline;
copy.textContent = t.dataset.copy;
});
});
}
function initPasswordToggles() {
document.querySelectorAll('[data-lg-toggle]').forEach(function (btn) {
btn.addEventListener('click', function () {
var input = document.querySelector(btn.dataset.lgToggle);
if (!input) return;
var show = input.type === 'password';
input.type = show ? 'text' : 'password';
btn.querySelector('.lg-eye').classList.toggle('d-none', show);
btn.querySelector('.lg-eye-off').classList.toggle('d-none', !show);
btn.setAttribute('aria-label', show ? 'Hide password' : 'Show password');
});
});
}
function initAuthForms() {
var ok = document.getElementById('lgOk');
document.querySelectorAll('.lg-form').forEach(function (form) {
form.addEventListener('submit', function (e) {
e.preventDefault();
form.classList.add('was-validated');
if (ok) ok.classList.toggle('d-none', !form.checkValidity());
});
});
}
initAuthTabs();
initPasswordToggles();
initAuthForms();
Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.