Multi-factor authentication.
<form class="mfa" style="--accent:#A8E6C1;">
<h3 class="mfa__heading">Verify it’s you</h3>
<p class="mfa__method" data-method="Authenticator app">Using <strong>Authenticator app</strong> · app on your phone</p>
<label class="mfa__field">
<span class="mfa__label">6-digit code</span>
<input type="text" inputmode="numeric" autocomplete="one-time-code" pattern="[0-9]*" maxlength="6" />
</label>
<label class="mfa__remember"><input type="checkbox" checked />Remember this device for 30 days</label>
<button type="submit" class="mfa__submit">Verify</button>
</form>
<style>
.mfa { font: 14px/1.4 system-ui, sans-serif; color: #241430; background: #FAF7F2; width: 300px; padding: 20px; border-radius: 14px; box-sizing: border-box; border: 1px solid #24143018; }
.mfa__heading { margin: 0 0 8px; font-size: 16px; }
.mfa__method { margin: 0 0 16px; font-size: 13px; color: #24143099; }
.mfa__field { display: block; margin-bottom: 12px; }
.mfa__label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 13px; }
.mfa input[type="text"] { width: 100%; box-sizing: border-box; padding: 10px; border-radius: 8px; border: 1.5px solid #24143030; font: 18px/1 system-ui, sans-serif; letter-spacing: .3em; }
.mfa__remember { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 14px; }
.mfa__submit { width: 100%; padding: 10px; border-radius: 8px; border: none; background: var(--accent); color: #14351f; font-weight: 700; cursor: pointer; }
.mfa__submit:focus-visible { outline: 2px solid #241430; outline-offset: 2px; }
</style><form class="w-[300px] p-5 rounded-2xl box-border border border-[#24143018] font-sans text-sm text-[#241430] bg-[#FAF7F2]">
<h3 class="m-0 mb-2 text-base">Verify it’s you</h3>
<p class="m-0 mb-4 text-[13px] text-[#241430]/60" data-method="Authenticator app">Using <strong>Authenticator app</strong> · app on your phone</p>
<label class="block mb-3">
<span class="block mb-1 font-semibold text-[13px]">6-digit code</span>
<input type="text" inputmode="numeric" autocomplete="one-time-code" pattern="[0-9]*" maxlength="6" class="w-full box-border p-2.5 rounded-lg border-[1.5px] border-[#24143030] text-lg tracking-[.3em]" />
</label>
<label class="flex items-center gap-2 text-[13px] mb-3.5"><input type="checkbox" checked />Remember this device for 30 days</label>
<button type="submit" class="w-full py-2.5 rounded-lg border-none font-bold cursor-pointer text-[#14351f]" style="background:#A8E6C1">Verify</button>
</form>export function Mfa({
heading = "Verify it’s you",
method = "Authenticator app",
maskedContact = "app on your phone",
rememberDevice = true,
accent = "#A8E6C1",
}) {
return (
<form style={{ font: "14px/1.4 system-ui, sans-serif", color: "#241430", background: "#FAF7F2", width: 300, padding: 20, borderRadius: 14, boxSizing: "border-box", border: "1px solid #24143018" }}>
<h3 style={{ margin: "0 0 8px", fontSize: 16 }}>{heading}</h3>
<p style={{ margin: "0 0 16px", fontSize: 13, color: "#24143099" }}>Using <strong>{method}</strong> · {maskedContact}</p>
<label style={{ display: "block", marginBottom: 12 }}>
<span style={{ display: "block", marginBottom: 5, fontWeight: 600, fontSize: 13 }}>6-digit code</span>
<input type="text" inputMode="numeric" autoComplete="one-time-code" pattern="[0-9]*" maxLength={6}
style={{ width: "100%", boxSizing: "border-box", padding: 10, borderRadius: 8, border: "1.5px solid #24143030", font: "18px/1 system-ui, sans-serif", letterSpacing: ".3em" }} />
</label>
{rememberDevice && <label style={{ display: "flex", alignItems: "center", gap: 8, fontSize: 13, marginBottom: 14 }}><input type="checkbox" defaultChecked />Remember this device for 30 days</label>}
<button type="submit" style={{ width: "100%", padding: 10, borderRadius: 8, border: "none", background: accent, color: "#14351f", fontWeight: 700, cursor: "pointer" }}>Verify</button>
</form>
);
}