Two factor and sign in
Trusted devices
Active sessions and trusted devices: device icon, browser and system, location and last activity, a This device badge with a live dot, and revoke buttons, plus a way to sign out everywhere else.
Example
<section class="grid gap-3 max-w-2xl" aria-labelledby="sessions-title">
<div class="flex flex-wrap items-end justify-between gap-2">
<div>
<h3 class="text-base font-semibold" id="sessions-title">Where you're signed in</h3>
<p class="text-sm text-muted-foreground">Devices that skip the second step for 30 days are marked Trusted.</p>
</div>
<button type="button" class="btn btn-sm btn-outline btn-danger">Sign out other sessions</button>
</div>
<ul class="auth-devices">
<li class="auth-device auth-device-current">
<span class="auth-device-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="4.5" y="5" width="15" height="10.5" rx="1.5"/><path d="M2.5 19h19"/></svg></span>
<div class="auth-device-body">
<p class="auth-device-name">Chrome on macOS <span class="badge badge-success badge-sm">This device</span></p>
<p class="auth-device-meta"><span>Lisbon, Portugal</span><span>203.0.113.24</span><span>Active now</span></p>
</div>
<span class="badge badge-sm">Trusted</span>
</li>
<li class="auth-device">
<span class="auth-device-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="7" y="2.5" width="10" height="19" rx="2.5"/><path d="M11 18.5h2"/></svg></span>
<div class="auth-device-body">
<p class="auth-device-name">Safari on iPhone <span class="badge badge-sm">Trusted</span></p>
<p class="auth-device-meta"><span>Porto, Portugal</span><span>2 hours ago</span></p>
</div>
<button type="button" class="btn btn-sm btn-ghost btn-danger" aria-label="Revoke Safari on iPhone">Revoke</button>
</li>
<li class="auth-device">
<span class="auth-device-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4" width="18" height="12" rx="2"/><path d="M8.5 20h7M12 16v4"/></svg></span>
<div class="auth-device-body">
<p class="auth-device-name">Firefox on Windows</p>
<p class="auth-device-meta"><span>Madrid, Spain</span><span>198.51.100.7</span><span>Sep 28, 2026</span></p>
</div>
<button type="button" class="btn btn-sm btn-ghost btn-danger" aria-label="Revoke Firefox on Windows">Revoke</button>
</li>
<li class="auth-device">
<span class="auth-device-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="4.5" y="3" width="15" height="18" rx="2.5"/><path d="M11 18h2"/></svg></span>
<div class="auth-device-body">
<p class="auth-device-name">Example app on Android tablet</p>
<p class="auth-device-meta"><span>São Paulo, Brazil</span><span>Aug 3, 2026</span></p>
</div>
<button type="button" class="btn btn-sm btn-ghost btn-danger" aria-label="Revoke Example app on Android tablet">Revoke</button>
</li>
</ul>
</section>Classes
7 classes. Click a name to copy it. Utilities on the same element always win over component defaults, so any of them can be adjusted with plain utility classes.
| Class | Type | What it does |
|---|---|---|
| Part | Part of the trusted devices. On an <ul> in the example. Sets grid display, margin, padding, background, border and corner radius.CSS |
|
| Base | Base class of the trusted devices. On a <li> in the example. Sets grid display, grid tracks, alignment, gap, padding and border.CSS |
|
| Modifier | Modifier, combined with the auth-device class. On a <li> in the example. Sets text color, background, generated content, absolute position, offsets and width.CSS |
|
| Part | Part of the trusted devices. On a <span> in the example. Sets grid display, alignment, width, height, text color and background.CSS |
|
| Part | Part of the trusted devices. On a <div> in the example. Sets grid display, gap and width.CSS |
|
| Part | Part of the trusted devices. On a <p> in the example. Sets flex display, alignment, gap, margin, text size and font weight.CSS |
|
| Part | Part of the trusted devices. On a <p> in the example. Sets flex display, alignment, gap, margin, text size and text color.CSS |
Usage
Components ship inside the same stylesheet as the utilities. There is nothing else to install and no script to load: link Monsoon and write the markup.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/monsooncss">
<!-- Trusted devices: start from the base class, then add modifiers -->
<section class="grid gap-3 max-w-2xl" aria-labelledby="sessions-title">
<div class="flex flex-wrap items-end justify-between gap-2">
<div>
<h3 class="text-base font-semibold" id="sessions-title">Where you're signed in</h3>
<p class="text-sm text-muted-foreground">Devices that skip the second step for 30 days are marked Trusted.</p>
</div>
<button type="button" class="btn btn-sm btn-outline btn-danger">Sign out other sessions</button>
</div>
<ul class="auth-devices">
<li class="auth-device auth-device-current">
<span class="auth-device-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="4.5" y="5" width="15" height="10.5" rx="1.5"/><path d="M2.5 19h19"/></svg></span>
<div class="auth-device-body">
<p class="auth-device-name">Chrome on macOS <span class="badge badge-success badge-sm">This device</span></p>
<p class="auth-device-meta"><span>Lisbon, Portugal</span><span>203.0.113.24</span><span>Active now</span></p>
<!-- the full example is in the Code tab above -->Theme it with --seed on any ancestor, for example style="--seed: #0d9488", and force a scheme with class="dark" or class="light" on a wrapper.
Accessibility
- Use
buttonfor actions andafor navigation. Icon only buttons need anaria-label; decorative icons carryaria-hidden="true". - Every interactive part shows a visible focus ring with
:focus-visible, and tone colors pair with-foregroundtokens that keep text at 4.5:1 or better in light and dark mode.