Overview
SignUpForm is a collection of components designed to facilitate the creation of a custom sign-up flow. It provides a set of components that encapsulate the business logic for handling forms, allowing users to easily customize the layout, styles, labels, placeholders, and button texts.Example Usage
custom-sign-up-form.tsx
Components
SignUpForm.Root
The root component of sign-up form. It encapsulates business logic for handling sign-up form.SignUpForm is responsible for creating a user. You need to implement a VerificationForm(from SignUpElement)
that displays and handle otp inputs logic(entering the code from email) and complete registration flow.
Props
React elements to be rendered inside the form. SignUpForm elements should be rendered as children of SignUpForm.Root.
A callback function that is called when the sign-up process is successfully completed.
Verification url used to redirect user to verification page from email.
It should contain a placeholder for verification code.
Input Fields
SignUpForm has the following exported input fields:- SignUpForm.FirstNameInput - field for entering first name.
- SignUpForm.LastNameInput - field for entering last name.
- SignUpForm.EmailInput - field for entering email.
- SignUpForm.PasswordInput - field for entering password.
- SignUpForm.ConfirmPasswordInput - field for entering password.
Props
Label for input field. Optional, if not provided the label will not be rendered.
Placeholder for input field. Optional, if not provided the placeholder will not be rendered.
Custom class name for label.
Custom class name for input.
SignInForm.ErrorMessage
Displays an error message if there is an error in the form submission.Props
Custom class name for the error message.
SignInForm.SubmitButton
Submit button for the form.Props
Text to be displayed on the button.
Custom class name for the button.