Sections

Auth Sections

Authentication sections provide complete, accessible forms for the flows every app needs: signing in, signing up, resetting a password, and verifying an identity. Every form is built with react-hook-form and zod validation and never makes a network request on its own.


Component Variants

Login Form (Card)

Welcome back

Sign in to your account to continue.

Or continue with email

Don't have an account? Sign up

Auth Split (Branded Panel + Login)

Welcome back

Sign in to your account to continue.

Or continue with email

Don't have an account? Sign up

Signup Form (Password Strength)

Create your account

Start building with TypeScript UI in minutes.

Already have an account? Sign in

Forgot Password Form

Forgot your password?

Enter your email and we will send you a link to reset your password.

Remembered your password? Back to sign in

Reset Password Form

Reset your password

Choose a new password for your account.

OTP Verification Form

Verify your identity

Enter the 6-digit code we sent to jane@example.com.

Didn't receive a code? Resend in 30s

Usage

import {
  LoginForm,
  SignupForm,
  ForgotPasswordForm,
  ResetPasswordForm,
  OTPVerificationForm,
  AuthSplit,
} from '@/components/ui/auth';

// Login Form
<LoginForm
  variant="card" // 'card' | 'plain'
  onSubmit={async (values) => console.log(values)}
  onGoogleSignIn={() => console.log('google')}
  onGithubSignIn={() => console.log('github')}
  forgotPasswordHref="/forgot-password"
  signupHref="/signup"
/>

// Signup Form (includes password strength meter)
<SignupForm
  onSubmit={async (values) => console.log(values)}
  termsHref="/terms"
  privacyHref="/privacy"
/>

// Forgot Password Form (shows a success state after submit)
<ForgotPasswordForm onSubmit={async (values) => console.log(values)} />

// Reset Password Form (validates password + confirmation match)
<ResetPasswordForm onSubmit={async (values) => console.log(values)} />

// OTP Verification Form
<OTPVerificationForm
  length={6}
  destination="jane@example.com"
  onSubmit={async (code) => console.log(code)}
  onResend={async () => console.log('resend')}
  resendCooldownSeconds={30}
/>

// Auth Split layout wrapper
<AuthSplit
  title="Build faster with TypeScript UI"
  description="A production-ready component library."
  testimonial={{ quote: 'Great library!', author: 'Jane Doe', role: 'CTO' }}
>
  <LoginForm variant="plain" />
</AuthSplit>

Props Reference

LoginForm

PropTypeDefaultDescription
variant'card' | 'plain''card'Container chrome; use 'plain' inside AuthSplit
onSubmit(values: LoginFormValues) => void | Promise<void>-Called with { email, password, remember }
onGoogleSignIn() => void | Promise<void>-Google button click handler
onGithubSignIn() => void | Promise<void>-GitHub button click handler
forgotPasswordHrefstring'#'Link target for "Forgot password?"
signupHrefstring'#'Link target for "Sign up"
titlestring'Welcome back'Heading text
descriptionstringDefault copySupporting text

SignupForm

PropTypeDefaultDescription
variant'card' | 'plain''card'Container chrome
onSubmit(values: SignupFormValues) => void | Promise<void>-Called with { name, email, password, acceptTerms }
loginHrefstring'#'Link target for "Sign in"
termsHrefstring'#'Terms of Service link
privacyHrefstring'#'Privacy Policy link
titlestring'Create your account'Heading text
descriptionstringDefault copySupporting text

ForgotPasswordForm

PropTypeDefaultDescription
variant'card' | 'plain''card'Container chrome
onSubmit(values: ForgotPasswordFormValues) => void | Promise<void>-Called with { email }
loginHrefstring'#'Link target for "Back to sign in"
titlestring'Forgot your password?'Heading text
descriptionstringDefault copySupporting text

ResetPasswordForm

PropTypeDefaultDescription
variant'card' | 'plain''card'Container chrome
onSubmit(values: ResetPasswordFormValues) => void | Promise<void>-Called with { password, confirmPassword }
titlestring'Reset your password'Heading text
descriptionstringDefault copySupporting text

OTPVerificationForm

PropTypeDefaultDescription
variant'card' | 'plain''card'Container chrome
lengthnumber6Number of OTP digits
destinationstring-Email/phone shown in the description
onSubmit(code: string) => void | Promise<void>-Called with the entered code
onResend() => void | Promise<void>-Resend handler
resendCooldownSecondsnumber30Seconds before resend is re-enabled
titlestring'Verify your identity'Heading text

AuthSplit

PropTypeDefaultDescription
titlestringDefault copyHeading on the branded panel
descriptionstringDefault copySupporting text on the branded panel
testimonial{ quote: string; author: string; role?: string }-Optional testimonial shown at the bottom of the panel
childrenReactNodeRequiredContent rendered on the right-hand side
Previous
Typography