Pro (paid add-on)
Account forms
ProFive ready-made form templates that cover the whole sign-in flow: sign in, sign up, forgot password, reset password and verify a code. They handle the interface, validation and accessibility; you connect your own backend.
Part of Pro
The account forms are in @vjdesigns-pro/ui, the commercial add-on package. See pricing. They use the same tokens, themes, 32 languages, right-to-left support and WCAG 2.2 AA standard as the free package.
The five forms
| Form | Fields | Sends to onSubmit |
|---|---|---|
SignInForm | Email (or username), password, "Remember me", "Forgot password?", and optional social sign-in buttons | { identifier, password, remember } |
SignUpForm | Name, email, a new password with a live checklist and strength meter, an optional confirmation and an optional terms checkbox | { name, email, password, acceptTerms } |
ForgotPasswordForm | Email; then a confirmation with "Send again" | { email } |
ResetPasswordForm | A new password (same checklist and strength meter), with an optional confirmation | { password } |
VerifyCodeForm | A 6-digit code (from email, SMS or an authenticator app), with "Resend code" | { code } |
Install
Pro needs a license, and installs from its own private registry; the free package still installs from npmjs.com. After purchase, store your base64-encoded license key in an environment variable such as VJDESIGNS_PRO_KEY (never commit it), and add these lines to your project's .npmrc. Pro needs @vjdesigns/vjdesigns-ui 3.8.0 or later, and React 19.
@vjdesigns-pro:registry=https://npm.pkg.keygen.sh/d1d3d49f-4fac-4bee-a1d9-2a65097f3737/
//npm.pkg.keygen.sh/:username=license
//npm.pkg.keygen.sh/:_password=${VJDESIGNS_PRO_KEY}
To base64-encode your license key:
# PowerShell
[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("<your license key>"))
# macOS or Linux
printf %s "<your license key>" | base64
Then install both packages:
npm install @vjdesigns/vjdesigns-ui @vjdesigns-pro/ui
Import both stylesheets once, at your app's entry point:
import "@vjdesigns/vjdesigns-ui/dist/vjdesigns-ui.css";
import "@vjdesigns-pro/ui/dist/vjdesigns-ui-pro.css";
Connect your backend
The forms handle the interface; you connect your own backend (Auth.js, Supabase, Firebase, Cognito or your own API) through onSubmit. It receives clean values (emails trimmed) and returns:
- Nothing when it worked.
onSuccess(values)then runs, for example to redirect. { error }for a problem with the whole form ("Email or password is incorrect.", "This link has expired."). It's shown above the form and takes focus.{ fieldErrors: { email: "…" } }for a problem with one field ("An account with this email already exists."). It's shown on that field until it's edited.
If onSubmit throws (a network failure, say), the form shows "Something went wrong. Try again." instead of breaking.
import { SignInForm } from "@vjdesigns-pro/ui";
<SignInForm
logo={<YourLogo />}
forgotPasswordHref="/forgot-password"
signUpHref="/sign-up"
providers={<GoogleButton />}
onSubmit={async ({ identifier, password, remember }) => {
const res = await fetch("/api/sign-in", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email: identifier, password, remember }),
});
if (res.status === 401) return { error: "Email or password is incorrect." };
if (res.status === 429) return { error: "Too many attempts. Try again in 5 minutes." };
if (!res.ok) throw new Error(`Sign-in failed: ${res.status}`);
}}
onSuccess={() => router.push("/dashboard")}
/>
VerifyCodeForm submits as soon as the last digit is typed or pasted. Pass onResend to show "Resend code", which waits out resendCooldown (30 seconds by default) between sends.
import { VerifyCodeForm } from "@vjdesigns-pro/ui";
<VerifyCodeForm
destination="j•••@example.com"
onResend={() => api.sendCode()}
onSubmit={async ({ code }) => {
const ok = await api.verify(code);
if (!ok) return { fieldErrors: { code: "That code isn't right. Check it and try again." } };
}}
onSuccess={() => router.push("/dashboard")}
/>
What's built in
- Password managers and autofill: a real
<form>, withautocompleteset correctly on every field (username,current-password,new-password,one-time-code). Phones offer emailed and texted codes, and pasting a code fills every box. - Passkeys:
passkeysonSignInFormlets the browser offer saved passkeys in the email field. Your page still starts the passkey request; this only allows it. - Validation: missing fields, malformed emails, short passwords, mismatched confirmations, unchecked terms and partial codes are caught before anything is sent. They're shown on each field and in a summary that takes focus.
- Password rules follow current NIST guidance: a minimum length (12 by default,
passwordMinLength) and no forced symbol mix. PasspasswordRequirementsfor your own rules; the live checklist and the validation both use them. - Safe messages: return one message for any failed sign-in, and the
ForgotPasswordFormconfirmation never says whether an account exists. That way the forms don't reveal which emails are registered. - Resend cooldown: "Resend code" shows the remaining wait ("Resend code in 0:24") and stays focusable while it waits, so the countdown can be read.
- Look and layout:
variant="card"(the default) or"plain"to sit in your own layout, pluslogo,title,description,headingLevelandfooter. Every form works in both modes, all brands, all 32 languages and right to left.
Warning: Checks in the browser aren't security
Build your own
Everything the account forms are built from is free: Field, PasswordInput, PinInput, ErrorSummary and useFormValidation. Server errors you set on a field stay until that field is edited or the form is submitted again.