Password reset
Forgot password and choose a new one: a cooldown on resend, wording that never reveals who has an account, and clear expired and saved states.
Caliper UI
Try limit@example.com for a rate limit.
When to use
- People cannot remember their password.
- The emailed link opens a page to set a new one.
When not to use
- The person is signed in and changing it; use security settings.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/password-reset
Adds its 13 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
ForgotPasswordForm
8 props
PropTypeDefaultDescription
titlestring"Reset your password"
descriptionstring"Enter the email you sign in with and we will send you a link to choose a new password."
defaultEmailstring""
expiresstring"30 minutes"How long the emailed link lasts, in words.
resendAfternumber30Seconds before "Resend email" can be pressed again.
onSubmit *(email: string) => AuthActionResult | Promise<AuthActionResult>—Send the reset email. Return `{ error }` for a message the person can act on, such as a rate limit.
back{ href?: string | undefined; onClick?: (() => void) | undefined; }—Where "Back to sign in" goes.
classNamestring—
ResetPasswordForm
9 props
PropTypeDefaultDescription
titlestring"Choose a new password"
emailstring—The account being reset, shown so people know which one they are changing.
minimumRulesnumber3How many password rules must be met.
expiredbooleanfalseStart in the expired state, when the token was already checked on the server.
onSubmit *(values: { password: string; signOutOthers: boolean; }) => ResetPasswordResult | Promise<ResetPasswordResult>—
onRequestNew(() => void)—Shown on the expired state: send a fresh link.
onContinue(() => void)—Shown once the password is saved.
continueLabelstring"Continue to sign in"
classNamestring—
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It exposes status and alert semantics, with aria-label and aria-invalid kept in step with state. Changes that matter are announced through a live region.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/password-reset.mdThe index of every part is at /llms.txt.
More in Settings & security
Settings screenSettings that show what changed before you save: an ember mark and the previous value on each field, one bar that names the changes.Email verificationConfirm an address with a six-digit code that checks itself when complete, with resend and a way to fix a typo.MFA challengeThe second step of sign in: authenticator, text, passkey or recovery code, with a lockout that counts down after too many tries.