RegisterWizard
A multi-step registration wizard with availability checks and register submit.
import { RegisterWizard } from "@schukai/monster/source/components/form/register-wizard.mjs";Introduction
The monster-register-wizard control provides a guided, multi-step registration flow with built-in validation, availability checks, and consent handling. It is designed to work with multiple API shapes through mapping options.
Flow Overview
- Email step with availability check
- Password step (optional confirm password)
- Profile step (name, optional birth date and nationality)
- Address step (street, zip, city, country)
- Consents step (required and optional topics)
The wizard navigation groups steps into Account, Profile, and Consents. Each step is validated before moving on, and invalid fields trigger inline messages on the action buttons.
Availability Check
Configure a POST endpoint and map the payload and response fields. When features.requireAvailability is enabled, the wizard blocks step changes until the email is confirmed as available.
Register Submit
The submit payload is built from the collected form values and mapped using dot-paths so it can match different backend shapes without changing the UI.
Consents
Consents can be provided statically via consents.topics or fetched from a URL and mapped into the expected topic/label/required structure.
Events
monster-register-wizard-step-changemonster-register-wizard-availability-checkmonster-register-wizard-availability-resultmonster-register-wizard-registermonster-register-wizard-successmonster-register-wizard-errormonster-register-wizard-invalid
Basic Register Wizard
A basic register wizard with inline step hints and static consent topics. Availability checks are disabled so the flow can be tested without a backend.
Create account
We use your email for account access and notifications.
You can change marketing preferences later.
You can continue with the next step.
Javascript
import '@schukai/monster/source/components/form/register-wizard.mjs';
const wizard = document.getElementById('register-wizard-basic');
wizard.setOption('tenant.id', '00000000-0000-0000-0000-000000000000');
wizard.setOption('features.requireAvailability', false);
wizard.setOption('features.confirmPassword', true);
wizard.setOption('features.showBirthDate', true);
wizard.setOption('features.showNationality', true);
wizard.setOption('consents.topics', [
{ topic: 'terms', label: 'Terms and conditions', required: true },
{ topic: 'privacy', label: 'Privacy policy', required: true },
{ topic: 'marketing', label: 'Marketing', required: false }
]);
wizard.refresh();HTML
<monster-register-wizard id="register-wizard-basic">
<h2 slot="title">Create account</h2>
<p slot="email-info">We use your email for account access and notifications.</p>
<p slot="consents-info">You can change marketing preferences later.</p>
<div slot="success">
<strong>Registration completed.</strong>
<p>You can continue with the next step.</p>
</div>
</monster-register-wizard>Stylesheet
/** no additional stylesheet is defined **/Component Design
The monster-register-wizard control uses Shadow DOM and exposes key elements via exported parts and named slots for customization.
Slots
title: Header title for the wizard.email-info,password-info,profile-info,address-info,consents-info: Inline hints per step.email-fields,password-fields,profile-fields,address-fields,consents-fields: Extra fields inside each step.success: Content shown after successful registration.footer: Optional footer content.
Exported Parts
control,header,body,nav,content,panelform,field-set,field-label,inputactions,back-button,next-button,submit-buttonavailability-message,step-messageconsents-title,consents-list,consent-row,consent-label,consent-description
monster-register-wizard::part(actions) {
justify-content: space-between;
}
monster-register-wizard::part(submit-button) {
min-width: 12rem;
}
HTML Structure
<monster-register-wizard></monster-register-wizard>JavaScript Initialization
const element = document.createElement('monster-register-wizard');
document.body.appendChild(element);Exported
RegisterWizardDerived from
CustomElementOptions
The Options listed in this section are defined directly within the class. This class is derived from several parent classes, including the CustomElement class. Therefore, it inherits Options from these parent classes. If you cannot find a specific Options in this list, we recommend consulting the documentation of the CustomElement.
- since
- deprecated
Properties and Attributes
The Properties and Attributes listed in this section are defined directly within the class. This class is derived from several parent classes, including the CustomElement class and ultimately from HTMLElement. Therefore, it inherits Properties and Attributes from these parent classes. If you cannot find a specific Properties and Attributes in this list, we recommend consulting the documentation of the CustomElement.
data-monster-options: Sets the configuration options for the collapse component when used as an HTML attribute.data-monster-option-[name]: Sets the value of the configuration option[name]for the collapse component when used as an HTML attribute.
Methods
The methods listed in this section are defined directly within the class. This class is derived from several parent classes, including the CustomElement class and ultimately from HTMLElement. Therefore, it inherits methods from these parent classes. If you cannot find a specific method in this list, we recommend consulting the documentation of the CustomElement.
Behavioral methods
refresh()data-monster-options must be used.Static methods
[instanceSymbol]()4.38.0monster-register-wizard-step-changemonster-register-wizard-availability-checkmonster-register-wizard-availability-resultmonster-register-wizard-registermonster-register-wizard-successmonster-register-wizard-errormonster-register-wizard-invalid
getCSSStyleSheet()data-monster-options must be used.getTag()data-monster-options must be used.Lifecycle methods
Lifecycle methods are called by the environment and are usually not intended to be called directly.
[assembleMethodSymbol]()data-monster-options must be used.Events
The component emits the following events:
monster-register-wizard-step-changemonster-register-wizard-availability-checkmonster-register-wizard-availability-resultmonster-register-wizard-registermonster-register-wizard-successmonster-register-wizard-errormonster-register-wizard-invalidmonster-register-wizard-step-changemonster-register-wizard-availability-checkmonster-register-wizard-availability-resultmonster-register-wizard-registermonster-register-wizard-successmonster-register-wizard-errormonster-register-wizard-invalid
For more information on how to handle events, see the mdn documentation.