Registration

Sign up form patterns with multi-step flows, social authentication, and password requirements. Accessible and progressively enhanced.

Overview

Registration forms are the gateway to your application. These patterns demonstrate best practices for collecting user information while maintaining a smooth, accessible experience using Vanilla Breeze's data-layout attributes and custom elements.

Key features:

  • data-layout attributes for layout without wrapper elements
  • <form-field> with validation messages using <output>
  • <text-divider> for separating authentication methods
  • Password confirmation with matching validation
  • Terms of service checkbox with required validation
  • Proper autocomplete attributes for form autofill
  • Password toggle (auto-enhanced by JS)

Simple Registration

A basic signup form using data-layout="cover" on the body for vertical centering, with <layout-card> constraining the width. Includes name, email, password with confirmation, and terms acceptance.

Multi-Step Registration

A wizard-style registration flow with a visual step indicator. Uses the nav.steps CSS pattern for the progress indicator and breaks the form into manageable sections. Great for collecting more detailed information without overwhelming users.

With Social Signup

Registration form with social authentication buttons above traditional email/password fields. Uses the <text-divider> element to visually separate authentication methods. Reduces friction for users who prefer OAuth signup.

Form Field Features

All these patterns use <form-field> which provides:

  • Validation icons: Checkmark/X appear after user interaction (disable with data-no-icon)
  • Password toggle: Show/hide button added automatically to password fields
  • Error messages: Use <output class="error"> with aria-live="polite"
  • Hint messages: Use <output> without class="error" for helpful hints
  • Required indicator: Asterisk added automatically to required field labels

Usage Notes

Password Requirements

  • Use minlength="8" (or your minimum) for basic validation
  • Provide clear requirements in a hint message using <output>
  • Consider showing password strength indicator for better UX
  • Always include password confirmation for new accounts

Terms of Service

  • Make the terms checkbox required to prevent form submission
  • Link to both Terms of Service and Privacy Policy
  • Use clear language about what the user is agreeing to

Autocomplete Attributes

  • autocomplete="name" for full name fields
  • autocomplete="email" for email address
  • autocomplete="new-password" for password creation (not current-password)
  • These help password managers and browsers autofill correctly

Accessibility

  • All inputs have associated labels
  • Validation messages use aria-live="polite" for screen reader announcements
  • Error messages are linked to inputs via aria-describedby
  • Step indicators include aria-current="step" for the active step

Related

Sign In

Login forms with social auth and 2FA

Form Field

Form field element with validation

Text Divider

Horizontal divider with text

Layout Card

Card container element