# Set new password

> Step 3. A new password and its confirmation, with the rules ticked off as the user types.

URL: https://apogee.avaui.dev/docs/forgot-password-pages/set-new-password
Last updated: 2026-10-15

Step 3. A new password and its confirmation, with the rules ticked off as the user types.

Last updated October 15, 2026

Live example: https://apogee.avaui.dev/examples/forgot-password/set-new-password

```astro
---
/**
 * Set new password: Step 3. A new password and its confirmation, with the rules ticked off as the user types.
 *
 * @page forgot-password
 */
import { Lock, ArrowLeft } from '@lucide/astro'
import AuthShell from '@/components/apogee/sections/AuthShell/AuthShell.astro'
import FeaturedIcon from '@/components/apogee/FeaturedIcon/FeaturedIcon.astro'
import Input from '@/components/apogee/Input/Input.astro'
import PasswordChecklist from '@/components/apogee/PasswordChecklist/PasswordChecklist.astro'
import Button from '@/components/apogee/Button/Button.astro'
---

<AuthShell heading="Set new password" description="Your new password must be different from the ones you used before." pattern="grid">
  <FeaturedIcon slot="brand" theme="outline" color="neutral" size="large"><Lock /></FeaturedIcon>

  <form method="post" class="flex flex-col gap-6">
    <div class="flex flex-col gap-3">
      <Input id="new-password" label="Password" type="password" name="password" placeholder="••••••••" autocomplete="new-password" minlength="8" required />
      <PasswordChecklist for="new-password" rules={[{ label: 'At least 8 characters', minLength: 8 }, { label: 'One special character', pattern: '[^A-Za-z0-9]' }]} />
      <Input id="confirm-password" label="Confirm password" type="password" name="password_confirm" placeholder="••••••••" autocomplete="new-password" required class="mt-2" />
      <PasswordChecklist for="confirm-password" rules={[{ label: 'Passwords match', match: 'new-password' }]} />
    </div>
    <Button type="submit" size="large" fullWidth>Reset password</Button>
  </form>

  <Button slot="footer" href="#" variant="ghost" color="neutral">
    <ArrowLeft slot="start" class="rtl:-scale-x-100" aria-hidden="true" />
    Back to log in
  </Button>
</AuthShell>
```

## Add

```sh
npx @ava-ui/apogee add forgot-password/set-new-password
```

This copies the page to `src/components/apogee/pages/forgot-password/` with everything it uses: AuthShell, Button, FeaturedIcon, Input, PasswordChecklist. Render it from one of your routes, or use **Copy code** above.

## Accessibility

-   The page heading is the `h1`; the “Back to log in” arrow flips under right-to-left text.
-   The rules are part of the password field’s description, and the field stays invalid until they hold. The confirm field stays invalid until it matches. See [PasswordChecklist](https://apogee.avaui.dev/docs/password-checklist).

## Related

[

Auth shellThe frame of a log in, sign up or recovery page; brand mark, heading and your form, centred, in a card, beside a panel, or beside a step sidebar.

](https://apogee.avaui.dev/docs/sections/auth-shell)[

PasswordChecklistThe rules a new password must meet, ticked off as the user types.

](https://apogee.avaui.dev/docs/password-checklist)[

Featured iconAn icon in a tinted tile, the glyph that leads an empty state, an alert, a stat or a feature card.

](https://apogee.avaui.dev/docs/featured-icon)
