Overview
UpdatePasswordForm is a collection of components designed to facilitate the creation of a custom forgot password flow. It provides a set of components that encapsulate the business logic for handling the update password form, allowing users to easily customize the layout, styles, labels, placeholders, and button texts.Example Usage
custom-update-password-form.tsx
UpdatePasswordForm.Root
The root component of password update form. It encapsulates business logic for password update, entering and resending verification code processes.UpdatePasswordForm is responsible for password updating for users who requested verification code by email in
RequestCodeForm (from ForgotPasswordElements).
Props
React elements to be rendered inside the form. UpdatePasswordForm elements should be rendered as children of UpdatePasswordForm.Root.
A callback function that is called when password is successfully updated.
Users e-mail for resending verification code.
Reset password url used to redirect user to reset password page from email.
It should contain a placeholder for the reset password code.
VerifyForm.OtpInputs
Displays input fields for the entering one-time password (OTP).Props
Direction of the input fields (e.g., “ltr” or “rtl”).
Input Fields
UpdatePasswordForm has the following exported input fields:- UpdatePasswordForm.PasswordInput - field for entering password.
- UpdatePasswordForm.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.
UpdatePasswordForm.ErrorMessage
Displays an error message if there is an error in the form submission.Props
Custom class name for the error message.
UpdatePasswordForm.SubmitButton
Submit button for the form.Props
Text to be displayed on the button.
Custom class name for the button.