Set New Password

Set a new password

Your new password must be different from previously used passwords.

  • At least 8 characters
  • One uppercase letter
  • One number
  • One special character
About this block

Set New PasswordFREE

Full-height reset-password screen with new and confirm password fields (each with a show/hide toggle) and a live requirements checklist that ticks off rules as the user types. Perfect for the final step of a password reset or invite flow.

Auth5: Set New Password

Full-height reset-password screen: a centered icon badge, new-password and confirm-password fields (each with its own show/hide toggle), a live checklist that ticks each requirement off as the user types, and a submit button.

Free block

This block is free. No license or account is required: install it with the CLI and use it in unlimited projects.

Installation

Radix flavor

bash
npx shadcn add "https://ui.beste.co/r/auth5"

Base UI flavor

bash
npx shadcn add "https://ui.beste.co/r-base/auth5"

This installs the block to components/beste/block/auth5.tsx and the button, input, and field shadcn/ui primitives it's built on.

Quick start

The installed file exports auth5Demo alongside the block: the exact props behind the preview above. Spread it to get a working reset screen in one line.

tsx
import { Auth5, auth5Demo } from "@/components/beste/block/auth5";

export default function ResetPasswordPage() {
  return <Auth5 {...auth5Demo} />;
}

Then replace the demo with your own props. Written out, a trimmed setup looks like this:

tsx
import { Lock } from "lucide-react";
import { Auth5 } from "@/components/beste/block/auth5";

export default function ResetPasswordPage() {
  return (
    <Auth5
      icon={<Lock className="size-6" />}
      heading="Set a new password"
      description="Your new password must be different from previously used passwords."
      requirements={[
        { label: "At least 8 characters", regex: ".{8,}" },
        { label: "One uppercase letter", regex: "[A-Z]" },
        { label: "One number", regex: "[0-9]" },
      ]}
      labels={{ newPassword: "New password", confirmPassword: "Confirm password", submit: "Reset password" }}
    />
  );
}

Props

PropTypeDefaultDescription
iconReact.ReactNodeIcon shown inside the circular badge above the heading
headingstringScreen title
descriptionstringSubtext below the heading
requirementsPasswordRequirement[][]Rules checked live against the new-password value
labelsobject{}Field, submit, and toggle copy, see below
classNamestringExtra classes for the outer <section>
ts
type PasswordRequirement = { label: string; regex: string };

type Auth5Labels = {
  newPassword?: string;
  newPasswordPlaceholder?: string;
  confirmPassword?: string;
  confirmPasswordPlaceholder?: string;
  submit?: string;
  passwordToggle?: string;
};

Behavior notes

  • Unlike the sign-in/sign-up screens in this family, the password fields here are fully controlled (useState), which is what makes the live requirements checklist possible: each requirement.regex string is compiled with new RegExp(...) and tested against the current password value on every render.
  • A requirement's row switches from a muted circle to a filled emerald circle with a check icon once its regex matches; nothing is checked while the password field is empty.
  • The two password fields have independent show/hide state (showPassword and showConfirm), so toggling one does not affect the other.
  • There is no comparison between the new-password and confirm-password values anywhere in the component; a mismatch is never flagged or blocked, and the submit button is never disabled by unmet requirements or a mismatch, only the requirements list visually indicates progress.
  • The <form> only calls e.preventDefault() on submit; there is no onSubmit prop, so the integrator must add the actual reset call and any mismatch validation themselves.

Wiring the form up

This block ships the form markup only; state, validation, and submit are yours to add. Our guide wires the shadcn Field primitives to React Hook Form, TanStack Form, and Formisch on one field system.

More Auth blocks

View all Auth
PRO

auth40

Change Password

Full-height change-password screen with current, new, and confirm password fields (show/hide toggles), a forgot-password link, and a cancel option. Perfect for account security settings.

PRO

auth46

Confirm It's You

Full-height step-up authentication screen that re-asks for the password before a sensitive action, showing the signed-in account and a cancel option. Perfect for protecting billing, security, and destructive actions.

PRO

auth8

Welcome Back Unlock

Full-height re-authentication screen showing the signed-in user's avatar, name, and email with a single password field, a forgot-password link, and a use-a-different-account option. Perfect for session unlock and returning-user prompts.

FREE

auth4

Forgot Password Request

Full-height password recovery screen with a centered icon, single email field built on the shadcn Field primitives, a send-reset-link button, and a back-to-sign-in link. Perfect for the first step of any password reset flow.

PRO

auth23

Account Locked

Full-height lockout screen shown after too many failed attempts, with a live mm:ss countdown, a retry button that unlocks when the timer ends, and a reset-password link. Perfect for rate-limited sign-in protection.

PRO

auth18

New Sign-In Security Alert

Full-height security notification screen listing the device, location, and time of a new sign-in, with confirm-it-was-me and secure-my-account actions. Perfect for suspicious-login alerts and account safety prompts.