Device Session List
A copy-paste login & auth component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Login & AuthHTMLCSSany framework
Active sessions
- This device
Copy into your project
HTML
<div class="nuda-au2-device-sessions">
<div class="nuda-au2-device-sessions__title">Active sessions</div>
<ul class="nuda-au2-device-sessions__list">
<li class="nuda-au2-device-sessions__item">
<svg class="nuda-au2-device-sessions__icon" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<rect x="3" y="4" width="18" height="12" rx="2"></rect>
<line x1="2" y1="20" x2="22" y2="20"></line>
</svg>
<div class="nuda-au2-device-sessions__meta">
<span class="nuda-au2-device-sessions__name">MacBook Pro — Chrome</span>
<span class="nuda-au2-device-sessions__time">Active now</span>
</div>
<span class="nuda-au2-device-sessions__badge">This device</span>
</li>
<li class="nuda-au2-device-sessions__item">
<svg class="nuda-au2-device-sessions__icon" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
<rect x="7" y="2" width="10" height="20" rx="2"></rect>
<line x1="11" y1="18" x2="13" y2="18"></line>
</svg>
<div class="nuda-au2-device-sessions__meta">
<span class="nuda-au2-device-sessions__name">iPhone 15 — Safari</span>
<span class="nuda-au2-device-sessions__time">2 hours ago</span>
</div>
<button class="nuda-au2-device-sessions__revoke" type="button" aria-label="Revoke session on iPhone 15">Revoke</button>
</li>
</ul>
</div>CSS
.nuda-au2-device-sessions {
display: flex;
flex-direction: column;
gap: 12px;
padding: 20px;
width: 100%;
max-width: 300px;
background: #0a0a0a;
border: 1px solid rgba(255,255,255,.08);
border-radius: 16px;
}
.nuda-au2-device-sessions__title {
color: #fafafa;
font-size: 13px;
font-weight: 600;
}
.nuda-au2-device-sessions__list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 8px;
}
.nuda-au2-device-sessions__item {
display: flex;
align-items: center;
gap: 10px;
padding: 10px;
background: rgba(255,255,255,.02);
border: 1px solid rgba(255,255,255,.06);
border-radius: 12px;
opacity: 0;
transform: translateY(6px);
animation: nuda-au2-device-sessions-in .5s cubic-bezier(.16,1,.3,1) both;
}
.nuda-au2-device-sessions__item:nth-child(2) {
animation-delay: .1s;
}
.nuda-au2-device-sessions__icon {
width: 20px;
height: 20px;
flex: 0 0 auto;
color: #a0a0a8;
}
.nuda-au2-device-sessions__meta {
display: flex;
flex-direction: column;
gap: 1px;
min-width: 0;
flex: 1 1 auto;
}
.nuda-au2-device-sessions__name {
color: #e5e5e5;
font-size: 12px;
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.nuda-au2-device-sessions__time {
color: #777;
font-size: 10.5px;
}
.nuda-au2-device-sessions__badge {
flex: 0 0 auto;
padding: 4px 8px;
background: rgba(228,255,84,.12);
color: #e4ff54;
border-radius: 999px;
font-size: 9.5px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .04em;
}
.nuda-au2-device-sessions__revoke {
flex: 0 0 auto;
min-width: 44px;
min-height: 44px;
padding: 0 10px;
background: transparent;
border: 1px solid rgba(255,255,255,.12);
border-radius: 10px;
color: #f3a3a3;
font-size: 11px;
font-weight: 600;
cursor: pointer;
transition: background-color .2s,border-color .2s;
}
.nuda-au2-device-sessions__revoke:hover {
background: rgba(255,90,90,.1);
border-color: rgba(255,90,90,.3);
}
.nuda-au2-device-sessions__revoke:focus-visible {
outline: 2px solid #e4ff54;
outline-offset: 2px;
}
@keyframes nuda-au2-device-sessions-in {
from {
opacity: 0;
transform: translateY(6px);
}
to {
opacity: 1;
transform: none;
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-au2-device-sessions__item {
animation: none;
opacity: 1;
transform: none;
}
}
How to use Device Session List
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.