Skip to main content

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

ReactNode
React elements to be rendered inside the form. SignInForm elements should be rendered as children of SignInForm.Root.
callback
required
A callback function that is called when the sign-in process is successfully completed.

SignInForm.EmailInput

An email input field.

Props

string
Label for the email input field. Optional, if not provided the label will not be rendered.
string
Placeholder for the email input field. Optional, if not provided the placeholder will not be rendered.
string
Custom class name for the email label.
string
Custom class name for the email input.

SignInForm.PasswordInput

Password input field with an optional “forgot password” link.

Props

string
Label for the password input field. Optional, if not provided the label will not be rendered.
string
Custom class name for the password label.
string
Custom class name for the email input.
object
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

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.

SignInForm.OAuthSection

A section for handling OAuth sign-in options.