This login panel is designed for session timeouts, prompting users to quickly re-authenticate without re-entering full credentials.
HTML
<section class="login-reauth">
<p class="login-reauth__message">Session expired</p>
<input type="password" placeholder="Password">
<button class="login-reauth__action">Unlock</button>
</section>CSS
.login-reauth {
width: 200px;
padding: 0.75rem;
border-radius: 18px;
background: #ffffff;
display: grid;
gap: 0.4rem;
text-align: center;
border: 1px solid #e5e7eb;
}
.login-reauth__message {
font-size: 12px;
color: #374151;
}
.login-reauth input {
padding: 0.45rem 0.5rem;
border-radius: 10px;
border: 1px solid #d1d5db;
background: #ffffff;
color: #111827;
font-size: 12px;
}
.login-reauth__action {
margin-top: 0.2rem;
padding: 0.4rem;
border-radius: 999px;
border: none;
background: #2563eb;
color: #ffffff;
font-size: 12px;
cursor: pointer;
transition: background 140ms ease;
}
.login-reauth__action:hover {
background: #1d4ed8;
}
@media (prefers-color-scheme: dark) {
.login-reauth {
background: #18181b;
border-color: #27272a;
}
.login-reauth__message {
color: #d4d4d8;
}
.login-reauth input {
background: #09090b;
border-color: #3f3f46;
color: #f4f4f5;
}
}Notes
- Optimized for session-expiry flows
- Minimal input surface
- Ideal for secure dashboards and admin panels
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.
