A login panel that allows switching authentication modes inline without leaving the surface.
HTML
<section class="login-mode">
<div class="login-mode__tabs">
<button class="is-active">Password</button>
<button>SSO</button>
</div>
<button class="login-mode__action">Continue</button>
</section>CSS
.login-mode {
width: 200px;
padding: 0.75rem;
border-radius: 16px;
background: #f9fafb;
display: grid;
gap: 0.5rem;
text-align: center;
}
.login-mode__tabs {
display: flex;
gap: 0.25rem;
}
.login-mode__tabs button {
flex: 1;
border: none;
background: #ffffff;
padding: 0.35rem 0;
border-radius: 999px;
font-size: 11px;
color: #6b7280;
cursor: pointer;
transition: background 150ms ease;
}
.login-mode__tabs button.is-active {
background: #6366f1;
color: #ffffff;
font-weight: 600;
}
.login-mode__action {
padding: 0.4rem;
border-radius: 999px;
border: none;
background: #111827;
color: #ffffff;
font-size: 12px;
}
@media (prefers-color-scheme: dark) {
.login-mode {
background: #020617;
}
.login-mode__tabs button {
background: #020617;
color: #9ca3af;
}
}Notes
- Inline auth method switching
- No page reload metaphor
- Works well in modals
Preview styles shown. Production customization recommended.
Browse More UI Components
Explore hundreds of reusable HTML & CSS UI components built for modern web projects.
Discover buttons, cards, loaders, animations, layouts, and more all with live previews and clean, copy-paste code.
