This password reset form allows users to set a new password and confirm it, ensuring accuracy and security.
HTML
<form class="reset-new">
<h3>Create New Password</h3>
<p class="subtitle">Your new password must be different from the old one.</p>
<input type="password" placeholder="New password" required>
<input type="password" placeholder="Confirm password" required>
<button type="button">Update Password</button>
</form>In production, change
type="button"totype="submit"and add validation.
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-new{
max-width:420px;
margin:80px auto;
padding:32px;
background:var(--card);
border-radius:18px;
border:1px solid var(--border);
box-shadow:0 16px 40px rgba(0,0,0,.12);
color:var(--text);
text-align:center;
}
.reset-new h3{
font-size:22px;
margin-bottom:6px;
}
.reset-new .subtitle{
font-size:14px;
color:var(--muted);
margin-bottom:24px;
}
.reset-new 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;
}
.reset-new input::placeholder{
color:var(--muted);
}
.reset-new input:focus{
border-color:var(--primary);
box-shadow:0 0 0 4px rgba(79,70,229,.18);
}
.reset-new 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;
}
.reset-new button:hover{
transform:translateY(-1px);
box-shadow:0 12px 30px rgba(0,0,0,.2);
}
.reset-new button:active{
transform:translateY(0);
box-shadow:none;
}
.reset-new button:disabled{
opacity:.6;
cursor:not-allowed;
box-shadow:none;
}Notes
- Standard reset completion step
- Reduces password errors
- Secure UX flow
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.
