Set New Password
A full-height reset-password screen: new-password and confirm-password fields each with their own independent show/hide toggle, and a live requirements checklist below that ticks green as the typed password satisfies each rule.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/set-new-password.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/auth/auth5.tsx instead.
Usage
The file also exports auth5Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Auth5, auth5Demo } from "@/components/blocks/auth/auth5"; export default function Page() { return <Auth5 {...auth5Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Set a new password" | Screen heading. |
| description | string | "Choose a strong password you haven't used before." | Short description shown under the heading. |
| submitLabel | string | "Reset password" | Label on the submit button. |
| className | string | none | Extra classes for the outer section element. |
Behavior notes
- The requirements checklist is genuine derived validation: it reads the real controlled value of the new-password input and re-evaluates length/uppercase/number checks on every keystroke, it is not a decorative static list.
- The two show/hide toggles are independent real client-side state, toggling the new-password field does not affect the confirm-password field and vice versa.
- The fixed requirement rules (length, uppercase, number) live inside the component rather than as a prop, since passing functions as props into a client component across the block-preview's server/client boundary is not supported in this codebase; the requirements are not currently configurable from outside the file.
- Confirm password is not compared against the new password, there is no matching check, and the form submit does not actually reset anything.
More Auth Blocks
View all →centered-sign-in-card
Centered Sign In Card
Full-height centered sign-in card with social buttons, a password show/hide toggle, and remember-me.
split-screen-sign-up
Split-Screen Sign Up
Two-column registration screen with a sign-up form on one side and a full-bleed photo with a customer quote on the other.
email-verification-code
Email Verification Code
Full-height OTP screen with a 6-digit segmented code input, auto-advancing focus, and a live resend countdown.
forgot-password-request
Forgot Password Request
Full-height password recovery screen with a single email field, a send-reset-link button, and a back-to-sign-in link.
magic-link-sign-in
Magic Link Sign In
Full-height passwordless sign-in screen with an email field, a send-magic-link button, and social login as a fallback.
account-chooser
Account Chooser
Full-height account picker listing saved accounts with avatars, plus a Use another account row.