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
| Prop | Type | Default | Description |
|---|---|---|---|
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 |
forgotPasswordHref | string | '#' | Link target for "Forgot password?" |
signupHref | string | '#' | Link target for "Sign up" |
title | string | 'Welcome back' | Heading text |
description | string | Default copy | Supporting text |
SignupForm
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'card' | 'plain' | 'card' | Container chrome |
onSubmit | (values: SignupFormValues) => void | Promise<void> | - | Called with { name, email, password, acceptTerms } |
loginHref | string | '#' | Link target for "Sign in" |
termsHref | string | '#' | Terms of Service link |
privacyHref | string | '#' | Privacy Policy link |
title | string | 'Create your account' | Heading text |
description | string | Default copy | Supporting text |
ForgotPasswordForm
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'card' | 'plain' | 'card' | Container chrome |
onSubmit | (values: ForgotPasswordFormValues) => void | Promise<void> | - | Called with { email } |
loginHref | string | '#' | Link target for "Back to sign in" |
title | string | 'Forgot your password?' | Heading text |
description | string | Default copy | Supporting text |
ResetPasswordForm
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'card' | 'plain' | 'card' | Container chrome |
onSubmit | (values: ResetPasswordFormValues) => void | Promise<void> | - | Called with { password, confirmPassword } |
title | string | 'Reset your password' | Heading text |
description | string | Default copy | Supporting text |
OTPVerificationForm
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'card' | 'plain' | 'card' | Container chrome |
length | number | 6 | Number of OTP digits |
destination | string | - | Email/phone shown in the description |
onSubmit | (code: string) => void | Promise<void> | - | Called with the entered code |
onResend | () => void | Promise<void> | - | Resend handler |
resendCooldownSeconds | number | 30 | Seconds before resend is re-enabled |
title | string | 'Verify your identity' | Heading text |
AuthSplit
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | Default copy | Heading on the branded panel |
description | string | Default copy | Supporting text on the branded panel |
testimonial | { quote: string; author: string; role?: string } | - | Optional testimonial shown at the bottom of the panel |
children | ReactNode | Required | Content rendered on the right-hand side |