Skip to main content
Urbicon UI
source

ResetPasswordPage

A form to set a new password from a reset link, with a confirmation field.

01 Usage

Basic

Reset password

  • At least 8 characters
<script lang="ts">
  import { ResetPasswordPage } from '@urbicon-ui/auth';
  import { page } from '$app/state';

  // Token from the reset link, e.g. /auth/reset-password?token=...
  const token = $derived(page.url.searchParams.get('token') ?? '');
</script>

<ResetPasswordPage {token} />

02 Accessibility

Both failures land in the same place

The mismatch check runs in the browser before anything is sent, and it writes to the same page-level role="alert" region as the server's invalid-token error. One region means a reader learns every way this page can fail from one spot, instead of having to hunt for which of two messages appeared. The confirmation after a successful reset uses the polite role="status" region beside it, so a success never interrupts.

A mismatch is reported at the page level

A confirm-password mismatch shows as page-level text rather than an error on either field, so the reader hears that the passwords differ, not which field to fix. With exactly two fields that is easy to recover from.

Autofill hints

Both fields are autoComplete="new-password", so a password manager offers to generate and then store the new secret rather than refilling the old one.

03 API Reference

16 props 1 required
Prop
Type
Default
Description

04 Types

Local type definitions used by this component.

7 types
Name
Kind
Category
Used by
Description

05 Installation

Import

import { ResetPasswordPage } from '@urbicon-ui/auth';