Skip to main content
Urbicon UI
source

RegisterPage

A registration form gated by an invitation token, with a live password-requirements checklist, posting to your register endpoint. Localizable through AuthLocale; restyle with snippet overrides or slotClasses.

01 Usage

Basic

Create account

  • At least 10 characters
  • One uppercase letter
  • One lowercase letter
  • One digit
Already have an account? Sign in
<script lang="ts">
  import { RegisterPage } from '@urbicon-ui/auth';
  import { goto } from '$app/navigation';
  import { page } from '$app/state';
  import { resolve } from '$app/paths';
</script>

<!-- The invitation link is /auth/register?token=<secret>&email=<invitee>; the
     token is the proof of invitation, so read both off the URL. -->
<RegisterPage
  token={page.url.searchParams.get('token') ?? ''}
  defaultEmail={page.url.searchParams.get('email') ?? ''}
  onSuccess={() => goto(resolve('/'))}
/>

02 Accessibility

The requirements list has a name

The password checklist is a real <ul> carrying aria-label, and the password field points at it with aria-describedby. The list is in the DOM from the first paint, not from the first keystroke — a description attached to an already-focused field is not reliably re-announced, so rules that appeared only after typing would never be read at all.

A refused password says which rule

The submit button is never disabled for an unmet rule. Submitting a password that misses one produces an error naming the rules it misses, so the reason is reachable even with showRequirements set to false. The server's refusal carries the same rules as machine values plus the policy it measured against, so the message is localized and the form re-gates on the real policy rather than repeating the refusal.

Pass/fail is text, not colour

Each requirement is prefixed with a literal or character, not an icon and not a colour swap alone, so the state survives a monochrome display. The glyph carries role="img" with a translated accessible name (“Met” / “Not met”), because a bare check mark is announced in the reader’s language rather than the page’s. The data-met attribute mirrors it for CSS only. Note the list is not itself a live region: it updates as you type but is not announced on every keystroke, which would make the field unusable with speech output.

Mismatch is bound to the field

A confirm-password mismatch is passed to the field as the error prop, so Input sets aria-invalid and links the message through aria-describedby. The reader hears the problem while focus is on the field that has it. Server-side failures go to the page-level live region instead.

Autofill hints

autoComplete is set on all four fields — name, email, and new-password on both password fields, which is the signal a password manager needs to offer a generated password rather than the saved one.

03 API Reference

18 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 { RegisterPage } from '@urbicon-ui/auth';