Auth page
Components: AnimatedBackground, Logo, Heading, Text, VStack, HStack, Field, FieldLabel
+18 more
FieldError, FieldGroup, Input, PasswordInput, OTPInput, PasswordComplexity, Button, Badge, Separator, RadioGroup, Radio, RadioIndicator, RadioLabel, Tag, Link, UtilityPage, Card, Toaster
An auth page is one 480px card, centered on AnimatedBackground, that holds one step of the sign-in flow.
When to use
There is no AuthCard, AuthPage, AuthLayout or LoginForm component; copy the first example into your app.
Rules
Layout and spacing
- Never render the card inside
PageorAppShell. AnimatedBackgroundcenters the card. Never center it yourself withfixed,absoluteortranslate.- Card:
w-[480px] rounded-12 border-1 border-border-primary-light bg-bg-surface-1 px-48 pt-32 pb-80 flex flex-col gap-32. - Never add a shadow. Never use
Card: it owns 16px padding. - Never use
UtilityPagefor an auth step: its title is styled as an error code. Never copy itsw-[482px]. - Never copy the
AppShellLoginFlowstory; it has a shadow. - Logo:
Logo type='full' size='md' className='mb-32 self-start'(64px to the title). - Title block:
VStack gap={0} align='start',Heading size='2xl' weight='medium'overText size='sm' color='secondary'. - Form:
VStack gap={16}orFieldGroup. Never wrapFieldto add margins. - SSO and "Back" buttons:
variant='secondary' color='neutral' fullWidth, stacked withVStack gap={8}. OR row:HStack gap={12}with twoSeparator className='flex-1'around aspan className='text-xs text-text-tertiary'. - Never pass
sizetoButton,InputorPasswordInputin the card. The 36px defaults are correct. - Never pass
classNametoField,HeadingorText. It is not applied. - If the card outgrows the viewport, add
max-h-[calc(100dvh-64px)] overflow-y-auto. - Background:
bg-component-app-shell-bg. There is nobg-card,bg-primaryorbg-surface.
Flow
- One card asks one thing. If a step needs two decisions, split it into two cards.
- If the email domain uses SSO, redirect after the email step. Never show an empty password step.
- If there are 6 or more organizations, show 5 and a ghost "Show more"
Buttonunder the group.
Form behavior
- Use one
<form onSubmit>per card; the primaryButtonistype='submit' fullWidth. - Give every other
Buttonin the formtype='button'; without it, the button submits. - Never put a bare
FieldActionin a<form>: it submits the form. UseFieldAction asChildwith an<a href>. autoComplete:email,current-password(sign-in),new-password(reset).- Pass
otpandgroupSize={3}toOTPInput. The default groups 2 + 2 + 2. - Never add
disabled={pending}next toloading; usedisabledonly for an incomplete form. Keep fields enabled while pending. - If sign-in fails, show
FieldErrorunder the password and keep both values. Never use anAlert,Banneror toast. - If the code is wrong, pass
errortoOTPInputand add aFieldErrorin the sameField. - Show the "LAST" badge on at most one button.
- For the resend countdown, use
Link disabled.FieldActiontakes nodisabled. - Import
FieldActionandFieldIndicatorfrom@wallarm-org/design-system/Field,useToastfrom@wallarm-org/design-system/Toast, icons from@wallarm-org/design-system/icons.
Copy
- Never say which credential is wrong. Use sentence case.
Examples
The sign-in flow in the card shell every step renders inside.
The sign-in flow: an email step, then a password step with "Forgot password?", the OR row and SSO buttons, one of them marked "LAST". There is no backend, so "Sign in" always shows the wrong-credentials state; an SSO button shows its spinner on that button only.
A password field with "Forgot password?" as a link and the failed state.
The failed password step: the error names neither credential, the password stays in the field, and editing it clears the error.
The OR row and SSO buttons with the "LAST" badge.
A clicked SSO button shows its spinner; the other buttons stay as they are.
Organization select, collapsed to 5 rows with "Show more".
Organization select for a user in 7 organizations: card radios collapsed to 5 rows, with a ghost "Show more" button under the group.
The reset code with a resend countdown, and the password rules from passwordValidators.
Password reset: a 6-digit code with a resend countdown, a new password with its confirmation,
and the full rule list from passwordValidators. "Continue" stays disabled until the code is
complete and every rule is met; it then shows the "Password reset" toast.
States
What your app owns
- Step routing, the password-or-SSO lookup, credential checks,
pendingand error state, SSO redirects, the resend timer, code verification and the reset email. - Storing the last-used method (cookie or
localStorage). - One
Toasterat the app root.
These do not exist:
- A
variantonUtilityPage. - A
labelprop onSeparator, or a badge prop onButton. - A "Show more" row in
RadioGroup. The card variant shows separate cards, not one joined list. - A clear (X) button on
Input, or a tertiaryText color. - An outline for the last-used button. Render the badge only.
- A non-focusable
Tag. Accept the extra tab stop.
Related
- Feedback toasts: the "Password reset" toast and the single
Toaster. - Create and edit forms:
Field,FieldErrorand required markers. - Spacing: px utilities and stack gaps.
- Typography:
HeadingandTextsizes. - Color: surface, border and text tokens.
- Radius and elevation:
rounded-12and why the card has no shadow.