Patterns
AuthForm
Multi-mode authentication form with login, register, and password reset.
Quick Preview
Welcome back
Sign in to your account
or
Don't have an account?
Installation
npm install lucide-react
// Copy fromsrc/components/patterns/AuthForm.tsx
Examples
Register mode
Create account
Start your free trial today
Already have an account?
Password reset
Reset password
We'll send you a link to reset it
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
mode | 'login' | 'register' | 'reset' | 'login' | Initial form mode |
onModeChange | (mode: AuthMode) => void | - | Mode change callback |
onSubmit | (data) => void | Promise<void> | - | Form submission handler |
title | string | - | Override default heading |
subtitle | string | - | Override default subtitle |
showSocial | boolean | true | Show social login button |
className | string | - | Additional CSS classes |