Overview
SignInForm is a collection of components designed to facilitate creation of a custom sign-in flow. It provides a set of components that encapsulate the business logic for handling forms, allowing users to easily customize layout, styles, labels, placeholders, and button texts.Example Usage
custom-sign-in-form.tsx
Components
SignInForm.Root
The root component of sign-in form. It encapsulates business logic for handling sign-in form.Props
React elements to be rendered inside the form. SignInForm elements should be rendered as children of SignInForm.Root.
A callback function that is called when the sign-in process is successfully completed.
SignInForm.EmailInput
An email input field.Props
Label for the email input field. Optional, if not provided the label will not be rendered.
Placeholder for the email input field. Optional, if not provided the placeholder will not be rendered.
Custom class name for the email label.
Custom class name for the email input.
SignInForm.PasswordInput
Password input field with an optional “forgot password” link.Props
Label for the password input field. Optional, if not provided the label will not be rendered.
Custom class name for the password label.
Custom class name for the email input.
An object containing the text and onClick handler for the “forgot password” link, if not provided the link will not be rendered.
forgotPassword
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.