Skip to main content

Forgot Password

Two-step password reset flow: request step (email entry) and confirmation step (success message).

Components used​

Button · Input · Card

Preview · Forgot Password

Code​

<div style="min-height:360px;display:flex;align-items:center;justify-content:center;background:var(--muted);width:100%;padding:2rem;box-sizing:border-box;gap:1.5rem;flex-wrap:wrap">

<!-- Step 1: Request -->
<div class="card" style="width:100%;max-width:380px;padding:2.5rem">
<div style="margin-bottom:1.75rem">
<h2 style="margin:0 0 0.5rem;font-size:1.25rem;font-weight:700">Reset your password</h2>
<p style="margin:0;font-size:0.875rem;color:var(--muted-foreground)">Enter the email address linked to your account and we will send you a reset link.</p>
</div>
<div class="vstack" style="gap:1rem">
<div data-field>
<label for="reset-email">Email address</label>
<input id="reset-email" type="email" placeholder="name@company.com" />
</div>
<button style="width:100%;justify-content:center">Send reset link</button>
<a href="#" style="text-align:center;font-size:0.875rem;color:var(--muted-foreground)">Back to sign in</a>
</div>
</div>

<!-- Step 2: Confirmation -->
<div class="card" style="width:100%;max-width:380px;padding:2.5rem;text-align:center">
<div style="width:52px;height:52px;border-radius:50%;background:color-mix(in srgb,var(--success) 12%,transparent);display:flex;align-items:center;justify-content:center;margin:0 auto 1.25rem">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" style="color:var(--success)"><polyline points="20 6 9 17 4 12"/></svg>
</div>
<h2 style="margin:0 0 0.5rem;font-size:1.25rem;font-weight:700">Check your email</h2>
<p style="margin:0 0 1.5rem;font-size:0.875rem;color:var(--muted-foreground)">We sent a reset link to <strong>name@company.com</strong>. The link expires in 15 minutes.</p>
<button class="outline" style="width:100%;justify-content:center">Resend email</button>
<a href="#" style="display:block;margin-top:1rem;font-size:0.875rem;color:var(--muted-foreground)">Back to sign in</a>
</div>

</div>