> For AI agents: the complete documentation index is available at https://wallarm.github.io/design-system/llms.txt, the full documentation bundle is available at https://wallarm.github.io/design-system/llms-full.txt.

# Auth page

**Components:** [`AnimatedBackground`](https://wallarm.github.io/design-system/components/animated-background.md), [`Logo`](https://wallarm.github.io/design-system/components/logo.md), [`Heading`](https://wallarm.github.io/design-system/components/heading.md), [`Text`](https://wallarm.github.io/design-system/components/text.md), [`VStack`](https://wallarm.github.io/design-system/components/stack.md), [`HStack`](https://wallarm.github.io/design-system/components/stack.md), [`Field`](https://wallarm.github.io/design-system/components/field.md), [`FieldLabel`](https://wallarm.github.io/design-system/components/field.md)


+18 more

[`FieldError`](https://wallarm.github.io/design-system/components/field.md), [`FieldGroup`](https://wallarm.github.io/design-system/components/field.md), [`Input`](https://wallarm.github.io/design-system/components/input.md), [`PasswordInput`](https://wallarm.github.io/design-system/components/password-input.md), [`OTPInput`](https://wallarm.github.io/design-system/components/input-otp.md), [`PasswordComplexity`](https://wallarm.github.io/design-system/components/password-complexity.md), [`Button`](https://wallarm.github.io/design-system/components/button.md), [`Badge`](https://wallarm.github.io/design-system/components/badge.md), [`Separator`](https://wallarm.github.io/design-system/components/separator.md), [`RadioGroup`](https://wallarm.github.io/design-system/components/radio.md), [`Radio`](https://wallarm.github.io/design-system/components/radio.md), [`RadioIndicator`](https://wallarm.github.io/design-system/components/radio.md), [`RadioLabel`](https://wallarm.github.io/design-system/components/radio.md), [`Tag`](https://wallarm.github.io/design-system/components/tag.md), [`Link`](https://wallarm.github.io/design-system/components/link.md), [`UtilityPage`](https://wallarm.github.io/design-system/components/utility-page.md), [`Card`](https://wallarm.github.io/design-system/components/card.md), [`Toaster`](https://wallarm.github.io/design-system/components/toast.md)

An auth page is one 480px card, centered on `AnimatedBackground`, that holds one step of the sign-in flow.

## When to use

| Need                                   | Use                                                              | Not                            |
| -------------------------------------- | ---------------------------------------------------------------- | ------------------------------ |
| Sign in with email and password        | Auth card: email step, then password step                        | A `Dialog` over the app        |
| Pick one of several organizations      | Auth card with `RadioGroup variant='card'`                       | `Select` inside the card       |
| Enter a reset code and a new password  | Auth card with `OTPInput`, `PasswordInput`, `PasswordComplexity` | Six separate `Input`s          |
| Show a 404, 403, 500 or offline screen | `UtilityPage`                                                    | The auth card                  |
| Show that the app loads after sign-in  | `SplashScreen`                                                   | A spinner inside the auth card |

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 `Page` or `AppShell`.
- `AnimatedBackground` centers the card. **Never** center it yourself with `fixed`, `absolute` or `translate`.
- 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 `UtilityPage` for an auth step: its title is styled as an error code. **Never** copy its `w-[482px]`.
- **Never** copy the `AppShell` `LoginFlow` story; 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'` over `Text size='sm' color='secondary'`.
- Form: `VStack gap={16}` or `FieldGroup`. **Never** wrap `Field` to add margins.
- SSO and "Back" buttons: `variant='secondary' color='neutral' fullWidth`, stacked with `VStack gap={8}`. OR row: `HStack gap={12}` with two `Separator className='flex-1'` around a `span className='text-xs text-text-tertiary'`.
- **Never** pass `size` to `Button`, `Input` or `PasswordInput` in the card. The 36px defaults are correct.
- **Never** pass `className` to `Field`, `Heading` or `Text`. 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 no `bg-card`, `bg-primary` or `bg-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" `Button` under the group.

### Form behavior

- Use one `<form onSubmit>` per card; the primary `Button` is `type='submit' fullWidth`.
- Give every other `Button` in the form `type='button'`; without it, the button submits.
- **Never** put a bare `FieldAction` in a `<form>`: it submits the form. Use `FieldAction asChild` with an `<a href>`.
- `autoComplete`: `email`, `current-password` (sign-in), `new-password` (reset).
- Pass `otp` and `groupSize={3}` to `OTPInput`. The default groups 2 + 2 + 2.
- **Never** add `disabled={pending}` next to `loading`; use `disabled` only for an incomplete form. Keep fields enabled while pending.
- If sign-in fails, show `FieldError` under the password and keep both values. **Never** use an `Alert`, `Banner` or toast.
- If the code is wrong, pass `error` to `OTPInput` and add a `FieldError` in the same `Field`.
- Show the "LAST" badge on at most one button.
- For the resend countdown, use `Link disabled`. `FieldAction` takes no `disabled`.
- Import `FieldAction` and `FieldIndicator` from `@wallarm-org/design-system/Field`, `useToast` from `@wallarm-org/design-system/Toast`, icons from `@wallarm-org/design-system/icons`.

### Copy

| Part                     | Write                                                          | Not                                     |
| ------------------------ | -------------------------------------------------------------- | --------------------------------------- |
| Sign-in title / subtitle | "Welcome back!" / "Sign in to your account"                    | "Login"                                 |
| Other titles             | "Select organization", "Reset password"                        | "Choose org"                            |
| Credentials error        | "Email or password is incorrect."                              | "Wrong password", "User not found"      |
| Submit                   | "Sign in" on the password step, "Continue" elsewhere           | "Log in", "Submit", "Next"              |
| SSO button               | "Continue with \{provider}"                                    | "Sign in with SSO"                      |
| Separator                | "OR"                                                           | "or continue with"                      |
| Organization subtitle    | "Choose which organization to sign in to."                     | "Select one"                            |
| Reset subtitle           | "We've sent a code to \{email}"                                | "Check your inbox"                      |
| Resend                   | "Resend in \{n}s", then "Resend code"                          | "Didn't get it?"                        |
| Reset toast              | "Password reset"                                               | "Your password was reset successfully!" |
| Placeholders             | "[you@your-company.com](mailto:you@your-company.com)", "Enter" | "Email", "Password"                     |

- **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.

```tsx
import { type ChangeEvent, type FormEvent, useState } from 'react';
import { AnimatedBackground } from '@wallarm-org/design-system/AnimatedBackground';
import { Badge } from '@wallarm-org/design-system/Badge';
import { Button } from '@wallarm-org/design-system/Button';
import { Field, FieldAction, FieldError, FieldLabel } from '@wallarm-org/design-system/Field';
import { Heading } from '@wallarm-org/design-system/Heading';
import { Aws, Google } from '@wallarm-org/design-system/icons';
import { Input } from '@wallarm-org/design-system/Input';
import { Logo } from '@wallarm-org/design-system/Logo';
import { PasswordInput } from '@wallarm-org/design-system/PasswordInput';
import { Separator } from '@wallarm-org/design-system/Separator';
import { HStack, VStack } from '@wallarm-org/design-system/Stack';
import { Text } from '@wallarm-org/design-system/Text';

export const Default = () => {
  const [step, setStep] = useState<'email' | 'password'>('email');
  const [email, setEmail] = useState('');
  const [password, setPassword] = useState('');
  const [failed, setFailed] = useState(false);
  const [ssoPending, setSsoPending] = useState<SignInMethod | null>(null);

  const handleEmailChange = (event: ChangeEvent<HTMLInputElement>) => setEmail(event.target.value);
  const handlePasswordChange = (event: ChangeEvent<HTMLInputElement>) => {
    setPassword(event.target.value);
    setFailed(false);
  };
  const handleEmailSubmit = (event: FormEvent<HTMLFormElement>) => {
    event.preventDefault();
    setStep('password');
  };
  const handleSignIn = (event: FormEvent<HTMLFormElement>) => {
    event.preventDefault();
    onSignIn({ email, password });
    setFailed(true);
  };
  const handleBack = () => {
    setStep('email');
    setPassword('');
    setFailed(false);
  };
  const handleAws = () => {
    setSsoPending('aws');
    onSsoContinue('aws');
  };
  const handleGoogle = () => {
    setSsoPending('google');
    onSsoContinue('google');
  };

  return (
    <AnimatedBackground className='h-full w-full bg-component-app-shell-bg'>
      <div
        data-testid='sign-in-card'
        className='flex max-h-[calc(100dvh-64px)] w-[480px] flex-col gap-32 overflow-y-auto rounded-12 border-1 border-border-primary-light bg-bg-surface-1 px-48 pt-32 pb-80'
      >
        <Logo type='full' size='md' className='mb-32 self-start' />
        <VStack gap={0} align='start'>
          <Heading size='2xl' weight='medium'>
            Welcome back!
          </Heading>
          <Text size='sm' color='secondary'>
            Sign in to your account
          </Text>
        </VStack>

        {step === 'email' && (
          <form onSubmit={handleEmailSubmit}>
            <VStack gap={16}>
              <Field data-testid='sign-in-email' required>
                <FieldLabel>Email</FieldLabel>
                <Input
                  type='email'
                  autoComplete='email'
                  placeholder='you@your-company.com'
                  value={email}
                  onChange={handleEmailChange}
                />
              </Field>
              <Button data-testid='sign-in-continue' type='submit' fullWidth disabled={!email}>
                Continue
              </Button>
            </VStack>
          </form>
        )}

        {step === 'password' && (
          <>
            <form onSubmit={handleSignIn}>
              <VStack gap={16}>
                <Field data-testid='sign-in-password' invalid={failed}>
                  <FieldLabel>
                    Password
                    <FieldAction asChild>
                      <a href='#forgot-password'>Forgot password?</a>
                    </FieldAction>
                  </FieldLabel>
                  <PasswordInput
                    autoComplete='current-password'
                    placeholder='Enter'
                    error={failed}
                    value={password}
                    onChange={handlePasswordChange}
                  />
                  {failed && <FieldError>Email or password is incorrect.</FieldError>}
                </Field>
                <VStack gap={8}>
                  <Button data-testid='sign-in-submit' type='submit' fullWidth disabled={!password}>
                    Sign in
                  </Button>
                  <Button
                    data-testid='sign-in-back'
                    type='button'
                    variant='secondary'
                    color='neutral'
                    fullWidth
                    onClick={handleBack}
                  >
                    Back
                  </Button>
                </VStack>
              </VStack>
            </form>

            <HStack gap={12}>
              <Separator className='flex-1' />
              <span className='text-xs text-text-tertiary'>OR</span>
              <Separator className='flex-1' />
            </HStack>

            <VStack gap={8} data-testid='sign-in-sso'>
              <div className='relative w-full'>
                <Button
                  variant='secondary'
                  color='neutral'
                  fullWidth
                  loading={ssoPending === 'aws'}
                  onClick={handleAws}
                >
                  <Aws />
                  Continue with AWS
                </Button>
                {LAST_METHOD === 'aws' && (
                  <Badge size='small' color='blue' className='absolute -top-6 -right-8 uppercase'>
                    Last
                  </Badge>
                )}
              </div>
              <div className='relative w-full'>
                <Button
                  variant='secondary'
                  color='neutral'
                  fullWidth
                  loading={ssoPending === 'google'}
                  onClick={handleGoogle}
                >
                  <Google />
                  Continue with Google
                </Button>
                {LAST_METHOD === 'google' && (
                  <Badge size='small' color='blue' className='absolute -top-6 -right-8 uppercase'>
                    Last
                  </Badge>
                )}
              </div>
            </VStack>
          </>
        )}
      </div>
    </AnimatedBackground>
  );
};
```

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.

```tsx
import { type ChangeEvent, type FormEvent, useState } from 'react';
import { Button } from '@wallarm-org/design-system/Button';
import { Field, FieldAction, FieldError, FieldLabel } from '@wallarm-org/design-system/Field';
import { PasswordInput } from '@wallarm-org/design-system/PasswordInput';
import { VStack } from '@wallarm-org/design-system/Stack';

export const WrongCredentials = () => {
  const [password, setPassword] = useState('Winter2026');
  const [failed, setFailed] = useState(true);

  const handlePasswordChange = (event: ChangeEvent<HTMLInputElement>) => {
    setPassword(event.target.value);
    setFailed(false);
  };
  const handleSignIn = (event: FormEvent<HTMLFormElement>) => {
    event.preventDefault();
    onSignIn({ email: 'maria.lopez@acme-bank.com', password });
    setFailed(true);
  };

  return (
    <div
      data-testid='wrong-credentials-card'
      className='flex max-h-[calc(100dvh-64px)] w-[480px] flex-col gap-32 overflow-y-auto rounded-12 border-1 border-border-primary-light bg-bg-surface-1 px-48 pt-32 pb-80'
    >
      <form onSubmit={handleSignIn}>
        <VStack gap={16}>
          <Field data-testid='wrong-credentials-password' invalid={failed}>
            <FieldLabel>
              Password
              <FieldAction asChild>
                <a href='#forgot-password'>Forgot password?</a>
              </FieldAction>
            </FieldLabel>
            <PasswordInput
              autoComplete='current-password'
              placeholder='Enter'
              error={failed}
              value={password}
              onChange={handlePasswordChange}
            />
            {failed && <FieldError>Email or password is incorrect.</FieldError>}
          </Field>
          <Button
            data-testid='wrong-credentials-submit'
            type='submit'
            fullWidth
            disabled={!password}
          >
            Sign in
          </Button>
        </VStack>
      </form>
    </div>
  );
};
```

The OR row and SSO buttons with the "LAST" badge.

A clicked SSO button shows its spinner; the other buttons stay as they are.

```tsx
import { useState } from 'react';
import { Badge } from '@wallarm-org/design-system/Badge';
import { Button } from '@wallarm-org/design-system/Button';
import { Aws, Google } from '@wallarm-org/design-system/icons';
import { Separator } from '@wallarm-org/design-system/Separator';
import { HStack, VStack } from '@wallarm-org/design-system/Stack';

export const SsoButtons = () => {
  const [ssoPending, setSsoPending] = useState<SignInMethod | null>(null);

  const handleAws = () => {
    setSsoPending('aws');
    onSsoContinue('aws');
  };
  const handleGoogle = () => {
    setSsoPending('google');
    onSsoContinue('google');
  };

  return (
    <div
      data-testid='sso-card'
      className='flex max-h-[calc(100dvh-64px)] w-[480px] flex-col gap-32 overflow-y-auto rounded-12 border-1 border-border-primary-light bg-bg-surface-1 px-48 pt-32 pb-80'
    >
      <HStack gap={12}>
        <Separator className='flex-1' />
        <span className='text-xs text-text-tertiary'>OR</span>
        <Separator className='flex-1' />
      </HStack>
      <VStack gap={8} data-testid='sso-buttons'>
        <div className='relative w-full'>
          <Button
            variant='secondary'
            color='neutral'
            fullWidth
            loading={ssoPending === 'aws'}
            onClick={handleAws}
          >
            <Aws />
            Continue with AWS
          </Button>
          {LAST_METHOD === 'aws' && (
            <Badge size='small' color='blue' className='absolute -top-6 -right-8 uppercase'>
              Last
            </Badge>
          )}
        </div>
        <div className='relative w-full'>
          <Button
            variant='secondary'
            color='neutral'
            fullWidth
            loading={ssoPending === 'google'}
            onClick={handleGoogle}
          >
            <Google />
            Continue with Google
          </Button>
          {LAST_METHOD === 'google' && (
            <Badge size='small' color='blue' className='absolute -top-6 -right-8 uppercase'>
              Last
            </Badge>
          )}
        </div>
      </VStack>
    </div>
  );
};
```

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.

```tsx
import { type FormEvent, useState } from 'react';
import { AnimatedBackground } from '@wallarm-org/design-system/AnimatedBackground';
import { Button } from '@wallarm-org/design-system/Button';
import { Heading } from '@wallarm-org/design-system/Heading';
import { Logo } from '@wallarm-org/design-system/Logo';
import { Radio, RadioGroup, RadioIndicator, RadioLabel } from '@wallarm-org/design-system/Radio';
import { VStack } from '@wallarm-org/design-system/Stack';
import { Text } from '@wallarm-org/design-system/Text';

export const SelectOrganization = () => {
  const [value, setValue] = useState<string | null>(null);
  const [expanded, setExpanded] = useState(false);

  const visible = expanded ? ORGANIZATIONS : ORGANIZATIONS.slice(0, 5);

  const handleValueChange = (details: { value: string | null }) => setValue(details.value);
  const handleToggle = () => setExpanded(!expanded);
  const handleSubmit = (event: FormEvent<HTMLFormElement>) => {
    event.preventDefault();
    onOrganizationSelect(value);
  };

  return (
    <AnimatedBackground className='h-full w-full bg-component-app-shell-bg'>
      <div
        data-testid='organization-card'
        className='flex max-h-[calc(100dvh-64px)] w-[480px] flex-col gap-32 overflow-y-auto rounded-12 border-1 border-border-primary-light bg-bg-surface-1 px-48 pt-32 pb-80'
      >
        <Logo type='full' size='md' className='mb-32 self-start' />
        <VStack gap={0} align='start'>
          <Heading size='2xl' weight='medium'>
            Select organization
          </Heading>
          <Text size='sm' color='secondary'>
            Choose which organization to sign in to.
          </Text>
        </VStack>

        <form onSubmit={handleSubmit}>
          <VStack gap={16}>
            <VStack gap={8} data-testid='organization-list'>
              <RadioGroup variant='card' value={value} onValueChange={handleValueChange}>
                {visible.map(org => (
                  <Radio key={org.id} value={org.id}>
                    <RadioIndicator />
                    <RadioLabel>{org.name}</RadioLabel>
                  </Radio>
                ))}
              </RadioGroup>
              {ORGANIZATIONS.length > 5 && (
                <Button
                  data-testid='organization-show-more'
                  type='button'
                  variant='ghost'
                  color='neutral'
                  onClick={handleToggle}
                >
                  {expanded ? 'Show less' : 'Show more'}
                </Button>
              )}
            </VStack>
            <Button data-testid='organization-continue' type='submit' fullWidth disabled={!value}>
              Continue
            </Button>
          </VStack>
        </form>
      </div>
    </AnimatedBackground>
  );
};
```

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.

```tsx
import { type ChangeEvent, type FormEvent, useState } from 'react';
import { AnimatedBackground } from '@wallarm-org/design-system/AnimatedBackground';
import { Button } from '@wallarm-org/design-system/Button';
import { Field, FieldIndicator, FieldLabel } from '@wallarm-org/design-system/Field';
import { Heading } from '@wallarm-org/design-system/Heading';
import { OTPInput } from '@wallarm-org/design-system/InputOTP';
import { Link } from '@wallarm-org/design-system/Link';
import { Logo } from '@wallarm-org/design-system/Logo';
import { PasswordComplexity, type PasswordComplexityItem, passwordValidators } from '@wallarm-org/design-system/PasswordComplexity';
import { PasswordInput } from '@wallarm-org/design-system/PasswordInput';
import { VStack } from '@wallarm-org/design-system/Stack';
import { Text } from '@wallarm-org/design-system/Text';
import { useToast } from '@wallarm-org/design-system/Toast';

export const ResetPassword = () => {
  const toast = useToast();
  const [code, setCode] = useState('');
  const [password, setPassword] = useState('');
  const [confirm, setConfirm] = useState('');

  // The app owns the resend timer; the story freezes it at 55 seconds.
  const secondsLeft = 55;

  const rules: PasswordComplexityItem[] = [
    {
      id: 'length',
      label: 'At least 8 characters',
      met: passwordValidators.minLength(8)(password),
    },
    {
      id: 'uppercase',
      label: 'One uppercase letter (A–Z)',
      met: passwordValidators.hasUppercase(password),
    },
    {
      id: 'lowercase',
      label: 'One lowercase letter (a–z)',
      met: passwordValidators.hasLowercase(password),
    },
    { id: 'number', label: 'One number (0–9)', met: passwordValidators.hasNumber(password) },
    {
      id: 'symbol',
      label: 'One symbol (e.g. ! ? @ #)',
      met: passwordValidators.hasSymbol(password),
    },
    {
      id: 'match',
      label: 'Both passwords match',
      met: passwordValidators.passwordsMatch(password, confirm),
    },
  ];
  const complete = code.length === 6 && rules.every(rule => rule.met);

  const handleCodeChange = (details: { valueAsString: string }) => setCode(details.valueAsString);
  const handlePasswordChange = (event: ChangeEvent<HTMLInputElement>) =>
    setPassword(event.target.value);
  const handleConfirmChange = (event: ChangeEvent<HTMLInputElement>) =>
    setConfirm(event.target.value);
  const handleSubmit = (event: FormEvent<HTMLFormElement>) => {
    event.preventDefault();
    onPasswordReset();
    toast.create({ id: 'password-reset', title: 'Password reset', type: 'default' });
  };

  return (
    <AnimatedBackground className='h-full w-full bg-component-app-shell-bg'>
      <div
        data-testid='reset-password-card'
        className='flex max-h-[calc(100dvh-64px)] w-[480px] flex-col gap-32 overflow-y-auto rounded-12 border-1 border-border-primary-light bg-bg-surface-1 px-48 pt-32 pb-80'
      >
        <Logo type='full' size='md' className='mb-32 self-start' />
        <VStack gap={0} align='start'>
          <Heading size='2xl' weight='medium'>
            Reset password
          </Heading>
          <Text size='sm' color='secondary'>
            We've sent a code to maria.lopez@acme-bank.com
          </Text>
        </VStack>

        <form onSubmit={handleSubmit}>
          <VStack gap={16}>
            <Field data-testid='reset-password-code' required>
              <FieldLabel>
                Code
                <FieldIndicator />
                <Link
                  asChild
                  size='sm'
                  weight='medium'
                  disabled={secondsLeft > 0}
                  onClick={onResend}
                  className='ml-auto'
                >
                  <button type='button'>
                    {secondsLeft > 0 ? `Resend in ${secondsLeft}s` : 'Resend code'}
                  </button>
                </Link>
              </FieldLabel>
              <OTPInput otp groupSize={3} onValueChange={handleCodeChange} />
            </Field>
            <Field data-testid='reset-password-new' required>
              <FieldLabel>
                New password
                <FieldIndicator />
              </FieldLabel>
              <PasswordInput
                autoComplete='new-password'
                placeholder='Enter'
                value={password}
                onChange={handlePasswordChange}
              />
            </Field>
            <Field data-testid='reset-password-confirm' required>
              <FieldLabel>
                Confirm password
                <FieldIndicator />
              </FieldLabel>
              <PasswordInput
                autoComplete='new-password'
                placeholder='Enter'
                value={confirm}
                onChange={handleConfirmChange}
              />
            </Field>
            <PasswordComplexity data-testid='reset-password-rules' items={rules} />
            <Button
              data-testid='reset-password-submit'
              type='submit'
              fullWidth
              disabled={!complete}
            >
              Continue
            </Button>
          </VStack>
        </form>
      </div>
    </AnimatedBackground>
  );
};
```

## States

| State               | Show                                            | Example component                                            |
| ------------------- | ----------------------------------------------- | ------------------------------------------------------------ |
| Email step          | Email field and "Continue"                      | `Field` + `Input type='email'`                               |
| Password step       | Password, "Forgot password?", OR, SSO           | `PasswordInput`, `FieldAction asChild`                       |
| Submitting          | Spinner on "Sign in"                            | `Button loading`                                             |
| Wrong credentials   | Red password border, error line                 | `Field invalid`, `PasswordInput error`, `FieldError`         |
| Last used method    | "LAST" on one button                            | `Badge size='small' color='blue'`                            |
| SSO redirect        | Spinner on the clicked button only              | `Button loading`                                             |
| Organization chosen | Building icon, name, "Change" above the fields  | `Tag` + `Link type='muted' size='sm'`                        |
| 6+ organizations    | 5 rows, then "Show more" / "Show less"          | Ghost `Button`                                               |
| Resend countdown    | "Resend in 55s", disabled                       | `Link disabled`                                              |
| Password rules      | Dot for unmet, check and strike-through for met | `PasswordComplexity`                                         |
| Reset done          | Sign-in card, then a toast                      | `toast.create({ title: 'Password reset', type: 'default' })` |

## What your app owns

- Step routing, the password-or-SSO lookup, credential checks, `pending` and error state, SSO redirects, the resend timer, code verification and the reset email.
- Storing the last-used method (cookie or `localStorage`).
- One `Toaster` at the app root.

These do not exist:

- A `variant` on `UtilityPage`.
- A `label` prop on `Separator`, or a badge prop on `Button`.
- A "Show more" row in `RadioGroup`. The card variant shows separate cards, not one joined list.
- A clear (X) button on `Input`, or a tertiary `Text color`.
- An outline for the last-used button. Render the badge only.
- A non-focusable `Tag`. Accept the extra tab stop.

## Related

- [Feedback toasts](https://wallarm.github.io/design-system/patterns/feedback-toasts.md): the "Password reset" toast and the single `Toaster`.
- [Create and edit forms](https://wallarm.github.io/design-system/patterns/create-edit-forms.md): `Field`, `FieldError` and required markers.
- [Spacing](https://wallarm.github.io/design-system/foundations/spacing.md): px utilities and stack gaps.
- [Typography](https://wallarm.github.io/design-system/foundations/typography.md): `Heading` and `Text` sizes.
- [Color](https://wallarm.github.io/design-system/foundations/color.md): surface, border and text tokens.
- [Radius and elevation](https://wallarm.github.io/design-system/foundations/radius-elevation.md): `rounded-12` and why the card has no shadow.
