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
ReactNode
React elements to be rendered inside the form. SignUpForm elements should be rendered as children of SignUpForm.Root.
callback
required
A callback function that is called when the sign-up process is successfully completed.
string
required
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
string
Label for input field. Optional, if not provided the label will not be rendered.
string
Placeholder for input field. Optional, if not provided the placeholder will not be rendered.
string
Custom class name for label.
string
Custom class name for input.
SignInForm.ErrorMessage
Displays an error message if there is an error in the form submission.Props
string
Custom class name for the error message.
SignInForm.SubmitButton
Submit button for the form.Props
string
Text to be displayed on the button.
string
Custom class name for the button.