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.
A full-height, centered change-password screen: a heading and description above a bordered card holding a current-password field with an inline forgot-password link, plus new-password and confirm-password fields that each carry an eye/eye-off show/hide toggle, a submit button, and a cancel prompt line beneath the card.
Pro blocks install through the shadcn CLI with your license key and ship their full source. Docs and live previews stay open to everyone, so you can read every block's details first.
Swap YOUR_EMAIL and YOUR_KEY for the email and license key on your account. Find your license key on your account page.
Radix flavor
npx shadcn add "https://ui.beste.co/r/auth40?email=YOUR_EMAIL&license_key=YOUR_KEY"Base UI flavor
npx shadcn add "https://ui.beste.co/r-base/auth40?email=YOUR_EMAIL&license_key=YOUR_KEY"This installs the block to components/beste/block/auth40.tsx, plus the button, input, and field shadcn/ui primitives it uses for the submit and toggle buttons, the password inputs, and the labeled field rows.
The installed file exports auth40Demo alongside the block: the exact props behind the preview above. Spread it to get a working change-password screen in one line.
import { Auth40, auth40Demo } from "@/components/beste/block/auth40";
export default function Page() {
return <Auth40 {...auth40Demo} />;
}Then replace the demo with your own props. Written out, a trimmed setup looks like this:
import { Auth40 } from "@/components/beste/block/auth40";
export default function Page() {
return (
<Auth40
heading="Change password"
description="Update the password you use to sign in."
labels={{
currentPassword: "Current password",
newPassword: "New password",
confirmPassword: "Confirm new password",
submit: "Update password",
passwordToggle: "Toggle password visibility",
}}
forgotPasswordLink={{ label: "Forgot password?", href: "/reset" }}
cancelPrompt={{ text: "Changed your mind?", linkLabel: "Cancel", href: "/account" }}
/>
);
}| Prop | Type | Default | Description |
|---|---|---|---|
heading | string | – | Centered page title above the card; hidden when omitted |
description | string | – | Muted subtitle under the heading; hidden when omitted |
labels | Labels | {} | Field labels, placeholders, submit text, and toggle aria-label |
forgotPasswordLink | { label: string; href: string } | – | Right-aligned link beside the current-password label |
cancelPrompt | { text: string; linkLabel: string; href: string } | – | Prompt line and link rendered below the card |
className | string | – | Extra classes for the outer <section> |
type Labels = {
currentPassword?: string;
currentPasswordPlaceholder?: string;
newPassword?: string;
newPasswordPlaceholder?: string;
confirmPassword?: string;
confirmPasswordPlaceholder?: string;
submit?: string;
passwordToggle?: string;
};labels.currentPassword, labels.newPassword, and labels.confirmPassword gate the current, new, and confirm blocks respectively, and labels.submit gates the submit button, so an empty labels object renders an empty form.useState booleans (showNew, showConfirm) that toggle each input's type between "password" and "text"; the current-password input has no toggle and stays type="password".onSubmit={(e) => e.preventDefault()}; the inputs are uncontrolled with no value, onChange, or validation, so collecting and persisting the entered passwords is left entirely to the integrator.ml-auto and only appears when forgotPasswordLink is provided; the toggle Button uses variant="ghost" and swaps the Eye/EyeOff lucide icons based on its state.useId() value suffixed with -current, -new, and -confirm, keeping label/input associations unique across multiple instances on one page.<section> is min-h-screen and vertically centers its max-w-md card, so the block is intended to own the full viewport rather than sit inline within other content.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.
auth5
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.
auth46
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.
auth18
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.
auth8
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.
auth21
Full-height passwordless sign-in screen with a fingerprint icon, a continue-with-passkey button, and a password fallback below a divider. Perfect for WebAuthn and biometric authentication flows.
auth17
Full-height signed-out screen with a centered icon, a heading and message, a sign-back-in button, and a return-home link. Perfect for logout confirmations and expired-session pages.