Authentication forms

Sign-in, registration, password-recovery and server-validation examples composed from forms, inputs, checkboxes, buttons, alerts and utility classes.

These examples cover signing in, recovering access and creating an account. Each form pairs visible labels with native inputs and shows where guidance or validation feedback belongs. Submitting a demo displays a local notification; connect the form to your application’s account service for real authentication.

The HTML tabs show essential markup; layout wrappers, repeated content, secondary details and demo behavior are omitted.

Sign in

Use a form-level alert for a credential error when no single field caused the failure. A generic message avoids revealing whether an account exists.

Sign in

Access your workspace

Password recovery

Ask only for the account identifier needed to start recovery. Return the same generic response whether the account exists so the form does not expose registered email addresses.

Reset your password

Request a secure reset link

Check your inbox

If an account matches the address, we will send password-reset instructions.

Back to sign in

Registration with server validation

On an unsuccessful server response, move focus to the error summary and link each message to its field. Preserve safe text and choice values so users only correct the errors; clear password fields instead of returning secrets in HTML.

Create an account

Correct the highlighted fields

An account already uses this email address.
Use at least 12 characters.
Choose a password that has not appeared in a known data breach.

Registration

Pair every required field with its visible label, and expose password guidance through aria-describedby. Give required checkboxes an explicit submission value.

Create an account

Start with your account details

Choose a strong password

Password managers can create and store one for you.

Use at least 12 characters.

Built with

  • Form and Input for labels, required fields, guidance and validation feedback.
  • Checkbox for remembered sessions and required consent.
  • Button for submission and secondary navigation actions.
  • Alert for form-level errors and a linked error summary.
  • Card and Icon for form structure and decorative status icons.
  • Flex, Sizing and Spacings for responsive form layouts.