Session Expired Re-auth
A copy-paste error & 404 pages component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Error & 404 PagesHTMLCSSany framework
Your session expired
For your security, please sign in again to continue.
Copy into your project
HTML
<div class="nuda-ep2-session-expired">
<div class="nuda-ep2-session-expired__icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="9" />
<path d="M12 7v5l3 3" />
</svg>
<span class="nuda-ep2-session-expired__badge" aria-hidden="true">401</span>
</div>
<p class="nuda-ep2-session-expired__title" role="alert">Your session expired</p>
<p class="nuda-ep2-session-expired__sub">For your security, please sign in again to continue.</p>
<div class="nuda-ep2-session-expired__actions">
<button class="nuda-ep2-session-expired__btn nuda-ep2-session-expired__btn--primary" type="button">Sign in again</button>
<button class="nuda-ep2-session-expired__btn" type="button">Go home</button>
</div>
</div>CSS
.nuda-ep2-session-expired {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
padding: 22px 20px;
background: #101010;
border: 1px solid rgba(255,255,255,.08);
border-radius: 16px;
width: 100%;
max-width: 260px;
text-align: center;
font-family: ui-sans-serif,system-ui;
}
.nuda-ep2-session-expired__icon {
position: relative;
width: 56px;
height: 56px;
display: flex;
align-items: center;
justify-content: center;
color: #f5a623;
background: rgba(245,166,35,.08);
border: 1px solid rgba(245,166,35,.22);
border-radius: 50%;
}
.nuda-ep2-session-expired__icon svg {
width: 26px;
height: 26px;
}
.nuda-ep2-session-expired__icon::before {
content: "";
position: absolute;
inset: -6px;
border-radius: 50%;
border: 1.5px solid rgba(245,166,35,.3);
animation: _nuda-ep2sessionexpired-ring 2.4s ease-out infinite;
}
.nuda-ep2-session-expired__badge {
position: absolute;
bottom: -4px;
right: -6px;
font-size: 8px;
font-weight: 800;
letter-spacing: .06em;
color: #0a0a0a;
background: #f5a623;
padding: 2px 5px;
border-radius: 99px;
}
.nuda-ep2-session-expired__title {
margin: 4px 0 0;
color: #fafafa;
font-size: 14px;
font-weight: 700;
}
.nuda-ep2-session-expired__sub {
margin: 0;
color: #8a8a8a;
font-size: 11px;
line-height: 1.5;
max-width: 210px;
}
.nuda-ep2-session-expired__actions {
display: flex;
gap: 8px;
margin-top: 6px;
}
.nuda-ep2-session-expired__btn {
min-height: 44px;
padding: 0 14px;
border-radius: 10px;
border: 1px solid rgba(255,255,255,.12);
background: rgba(255,255,255,.04);
color: #cfcfcf;
font-size: 11.5px;
font-weight: 600;
cursor: pointer;
transition: background .2s,border-color .2s;
}
.nuda-ep2-session-expired__btn:hover {
background: rgba(255,255,255,.08);
}
.nuda-ep2-session-expired__btn:focus-visible {
outline: 2px solid #e4ff54;
outline-offset: 2px;
}
.nuda-ep2-session-expired__btn--primary {
background: rgba(228,255,84,.1);
border-color: rgba(228,255,84,.3);
color: #e4ff54;
}
.nuda-ep2-session-expired__btn--primary:hover {
background: rgba(228,255,84,.18);
}
@keyframes _nuda-ep2sessionexpired-ring {
0% {
transform: scale(1);
opacity: .7;
}
100% {
transform: scale(1.35);
opacity: 0;
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-ep2-session-expired__icon::before {
animation: none;
opacity: 0;
}
}
How to use Session Expired Re-auth
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.