Two factor and sign in
Two factor status
Account settings card: on or off badge, the methods in use with manage and remove actions, recovery codes left with a regenerate button and when the account was last verified. The .auth-status-off modifier turns the card into a prompt to switch it on.
Example
<div class="grid gap-4 max-w-2xl">
<section class="auth-status" aria-labelledby="mfa-status-title">
<header class="auth-status-header">
<span class="auth-icon auth-icon-success"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3 5 6v5.2c0 4.4 3 8.3 7 9.8 4-1.5 7-5.4 7-9.8V6z"/><path d="m9 12 2.2 2.2L15.5 10"/></svg></span>
<div class="auth-status-intro">
<h3 class="auth-status-title" id="mfa-status-title">Two factor authentication <span class="badge badge-success badge-sm">On</span></h3>
<p class="auth-status-text">You'll be asked for a second step when you sign in on a new device.</p>
</div>
<button type="button" class="btn btn-sm btn-outline btn-neutral">Turn off</button>
</header>
<ul class="auth-status-list">
<li class="auth-status-item">
<span class="auth-status-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="6.5" y="2.5" width="11" height="19" rx="2.5"/><path d="M10.5 18.5h3"/><path d="M9.5 9.5h5M9.5 12.5h3"/></svg></span>
<div class="auth-status-body">
<p class="auth-status-name">Authenticator app <span class="badge badge-primary badge-sm">Default</span></p>
<p class="auth-status-meta">Added Mar 4, 2026 · Last used 2 hours ago</p>
</div>
<div class="auth-status-actions"><button type="button" class="btn btn-sm btn-ghost btn-neutral">Manage</button></div>
</li>
<li class="auth-status-item">
<span class="auth-status-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="9.5" cy="8" r="3.5"/><path d="M3.5 20a6 6 0 0 1 9.4-4.9"/><circle cx="17.5" cy="12.5" r="2.5"/><path d="M17.5 15v6l1.6-1.3M17.5 18l1.4 1"/></svg></span>
<div class="auth-status-body">
<p class="auth-status-name">Passkey on MacBook Air</p>
<p class="auth-status-meta">Added Jun 18, 2026 · Last used yesterday</p>
</div>
<div class="auth-status-actions"><button type="button" class="btn btn-sm btn-ghost btn-neutral">Rename</button><button type="button" class="btn btn-sm btn-ghost btn-danger">Remove</button></div>
</li>
<li class="auth-status-item">
<span class="auth-status-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4.5 5.5h15a1 1 0 0 1 1 1V16a1 1 0 0 1-1 1H9l-4.5 3.5V6.5a1 1 0 0 1 1-1z"/><path d="M8.5 11.25h.01M12 11.25h.01M15.5 11.25h.01" stroke-width="2.4"/></svg></span>
<div class="auth-status-body">
<p class="auth-status-name">Text message</p>
<p class="auth-status-meta">+55 •• •••••-0474 · Backup method</p>
</div>
<div class="auth-status-actions"><button type="button" class="btn btn-sm btn-ghost btn-neutral">Change</button><button type="button" class="btn btn-sm btn-ghost btn-danger">Remove</button></div>
</li>
</ul>
<footer class="auth-status-footer">
<span>8 of 10 recovery codes left · Last verified Oct 12, 2026</span>
<button type="button" class="btn btn-sm btn-outline btn-neutral"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 11.5A8 8 0 0 0 5.6 6.8L4 8.5"/><path d="M4 4v4.5h4.5"/><path d="M4 12.5a8 8 0 0 0 14.4 4.7L20 15.5"/><path d="M20 20v-4.5h-4.5"/></svg> Regenerate codes</button>
</footer>
</section>
<section class="auth-status auth-status-off" aria-labelledby="mfa-off-title">
<header class="auth-status-header">
<span class="auth-icon auth-icon-warning"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3 5 6v5.2c0 4.4 3 8.3 7 9.8 4-1.5 7-5.4 7-9.8V6z"/><path d="M12 8v4.5M12 16h.01"/></svg></span>
<div class="auth-status-intro">
<h3 class="auth-status-title" id="mfa-off-title">Two factor authentication <span class="badge badge-warning badge-sm">Off</span></h3>
<p class="auth-status-text">Add a second step so a stolen password is not enough to get into your account.</p>
</div>
<button type="button" class="btn btn-sm btn-primary">Turn on</button>
</header>
</section>
</div>Classes
19 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 |
|---|---|---|
| Base | Base class of the two factor status. On a <section> in the example. Sets grid display, overflow, background, border, corner radius and shadow, and --tone.CSS |
|
| Modifier | Modifier, combined with the auth-status class. On a <section> in the example. Sets --tone.CSS |
|
| Part | Part of the two factor status. On a <header> in the example. Sets flex display, alignment, gap, padding and margin.CSS |
|
| Part | Part of the two factor status. On a <div> in the example. Sets grid display, alignment, gap and width.CSS |
|
| Part | Part of the two factor status. On a <h3> in the example. Sets flex display, alignment, gap, margin, text size and font weight.CSS |
|
| Part | Part of the two factor status. On a <p> in the example. Sets margin, text size, text style and text color.CSS |
|
| Part | Part of the two factor status. On an <ul> in the example. Sets margin, padding and border.CSS |
|
| Part | Part of the two factor status. On a <li> in the example. Sets grid display, grid tracks, alignment, gap, padding and border.CSS |
|
| Part | Part of the two factor status. On a <span> in the example. Sets grid display, alignment, width, height, text color and background.CSS |
|
| Part | Part of the two factor status. On a <div> in the example. Sets grid display, gap and width.CSS |
|
| Part | Part of the two factor status. On a <p> in the example. Sets flex display, alignment, gap, margin, text size and font weight.CSS |
|
| Part | Part of the two factor status. On a <p> in the example. Sets margin, text size and text color.CSS |
|
| Part | Part of the two factor status. On a <div> in the example. Sets flex display, alignment and gap.CSS |
|
| Part | Part of the two factor status. On a <footer> in the example. Sets flex display, alignment, gap, padding, text size and text color.CSS |
|
| Part | Part of the two factor status. On a <span> in the example. Sets --tone.CSS |
|
| Part | Part of the two factor status. On a <span> in the example. Sets --tone.CSS |
|
| Part | Part of the two factor status. Not used in the example above. Sets --tone.CSS |
|
| Part | Part of the two factor status. Not used in the example above. Sets --tone.CSS |
|
| Part | Part of the two factor status. Not used in the example above. Sets --tone.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">
<!-- Two factor status: start from the base class, then add modifiers -->
<div class="grid gap-4 max-w-2xl">
<section class="auth-status" aria-labelledby="mfa-status-title">
<header class="auth-status-header">
<span class="auth-icon auth-icon-success"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3 5 6v5.2c0 4.4 3 8.3 7 9.8 4-1.5 7-5.4 7-9.8V6z"/><path d="m9 12 2.2 2.2L15.5 10"/></svg></span>
<div class="auth-status-intro">
<h3 class="auth-status-title" id="mfa-status-title">Two factor authentication <span class="badge badge-success badge-sm">On</span></h3>
<p class="auth-status-text">You'll be asked for a second step when you sign in on a new device.</p>
</div>
<button type="button" class="btn btn-sm btn-outline btn-neutral">Turn off</button>
</header>
<ul class="auth-status-list">
<li class="auth-status-item">
<span class="auth-status-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="6.5" y="2.5" width="11" height="19" rx="2.5"/><path d="M10.5 18.5h3"/><path d="M9.5 9.5h5M9.5 12.5h3"/></svg></span>
<div class="auth-status-body">
<!-- 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.