This multi-step password reset form breaks the recovery process into clear steps, improving usability and reducing user confusion during account recovery.
HTML
<div class="reset-steps">
<!-- Step indicators -->
<div class="steps">
<span class="step active">1</span>
<span class="step">2</span>
<span class="step">3</span>
</div>
<!-- STEP 1: Email -->
<form class="panel active">
<h3>Reset Password</h3>
<p class="subtitle">Enter your email to receive a code</p>
<input type="email" placeholder="Email address" required>
<button type="button">Send Code</button>
</form>
<!-- STEP 2: Code -->
<form class="panel">
<h3>Verify Code</h3>
<p class="subtitle">Check your email for the 6-digit code</p>
<input type="text" placeholder="Verification code" required>
<button type="button">Verify</button>
</form>
<!-- STEP 3: New password -->
<form class="panel">
<h3>Create New Password</h3>
<p class="subtitle">Choose a strong password</p>
<input type="password" placeholder="New password" required>
<input type="password" placeholder="Confirm password" required>
<button type="button">Update Password</button>
</form>
</div>Note: Toggle .active on .panel and .step using JavaScript or backend logic.
CSS
:root{
--bg:#f8fafc;
--card:#ffffff;
--text:#0f172a;
--muted:#64748b;
--border:#e5e7eb;
--primary:#4f46e5;
--primary-dark:#4338ca;
}
@media (prefers-color-scheme: dark){
:root{
--bg:#020617;
--card:#020617;
--text:#e5e7eb;
--muted:#94a3b8;
--border:#1f2937;
--primary:#6366f1;
--primary-dark:#818cf8;
}
}
body{
background:var(--bg);
font-family:system-ui, -apple-system, sans-serif;
}
.reset-steps{
max-width:420px;
margin:80px auto;
}
.steps{
display:flex;
justify-content:center;
gap:12px;
margin-bottom:20px;
}
.step{
width:28px;
height:28px;
border-radius:50%;
border:2px solid var(--border);
color:var(--muted);
display:flex;
align-items:center;
justify-content:center;
font-size:13px;
font-weight:600;
}
.step.active{
border-color:var(--primary);
background:var(--primary);
color:#fff;
}
.panel{
display:none;
padding:32px;
background:var(--card);
border-radius:18px;
border:1px solid var(--border);
box-shadow:0 16px 40px rgba(0,0,0,.12);
text-align:center;
color:var(--text);
}
.panel.active{
display:block;
}
.panel h3{
font-size:22px;
margin-bottom:6px;
}
.panel .subtitle{
font-size:14px;
color:var(--muted);
margin-bottom:24px;
}
.panel input{
width:100%;
padding:14px 16px;
margin-bottom:16px;
border-radius:12px;
border:1px solid var(--border);
background:linear-gradient(180deg,var(--card),var(--bg));
color:var(--text);
font-size:15px;
outline:none;
transition:border .2s ease, box-shadow .2s ease;
}
.panel input::placeholder{
color:var(--muted);
}
.panel input:focus{
border-color:var(--primary);
box-shadow:0 0 0 4px rgba(79,70,229,.18);
}
.panel button{
width:100%;
padding:14px;
border:none;
border-radius:12px;
background:linear-gradient(
135deg,
var(--primary),
var(--primary-dark)
);
color:#ffffff;
font-size:15px;
font-weight:600;
cursor:pointer;
transition:transform .15s ease, box-shadow .15s ease;
}
.panel button:hover{
transform:translateY(-1px);
box-shadow:0 12px 30px rgba(0,0,0,.2);
}
.panel button:active{
transform:translateY(0);
box-shadow:none;
}Notes
- Clear step-by-step recovery flow
- Reduces user confusion
- Scales well for complex auth flows
- JavaScript-ready for step control
Preview styles shown. Production customization recommended.
Browse More UI Components
Explore hundreds of reusable HTML & CSS UI components built for modern web projects.
Discover buttons, cards, loaders, animations, layouts, and more all with live previews and clean, copy-paste code.
