# modern-auth > interface LoginFormProps { onSubmit: (email: string, password: string) => Promise; onSocialLogin?: (provider: 'google' | 'github' | 'apple') => void; onForgotPassword?: () => void; isLoading?: boolean; } - Author: OwaisImran2005 - Repository: OwaisImran2005/todo_CLI_App_ - Version: 20260207040852 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-07 - Source: https://github.com/OwaisImran2005/todo_CLI_App_ - Web: https://mule.run/skillshub/@@OwaisImran2005/todo_CLI_App_~modern-auth:20260207040852 --- ## Modern Auth Components --- name: modern-auth description: Create stunning authentication forms with login, signup, and password reset. Modern glassmorphism design with social auth integration. Use when building auth interfaces. --- ### Instructions Create authentication components with these features: #### **Visual Design** - Glassmorphism effect with backdrop blur - Gradient backgrounds and accents - Smooth transitions and animations - Form field animations (focus, error states) - Password strength indicators - Social auth buttons (Google, GitHub, Apple) - Split-screen layouts (form + image) #### **Form Features** - Login form with email/password - Signup form with validation - Password reset/forgot password - Email verification screens - Two-factor authentication (2FA) - Remember me checkbox - Show/hide password toggle - Auto-focus on first field - Enter key submission #### **User Experience** - Real-time validation feedback - Loading states during submission - Success/error animations - Smooth form transitions - Accessibility (ARIA labels, keyboard nav) - Mobile-responsive design - Touch-friendly inputs (min 44px) #### **Security Indicators** - Password strength meter - CAPTCHA integration - Rate limiting messages - Secure connection badge - Privacy policy links ### Example Code #### Login Form Component ```typescript // components/auth/LoginForm.tsx import { useState } from 'react'; import { Eye, EyeOff, Mail, Lock, Chrome, Github, Apple } from 'lucide-react'; interface LoginFormProps { onSubmit: (email: string, password: string) => Promise; onSocialLogin?: (provider: 'google' | 'github' | 'apple') => void; onForgotPassword?: () => void; isLoading?: boolean; } export function LoginForm({ onSubmit, onSocialLogin, onForgotPassword, isLoading }: LoginFormProps) { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [showPassword, setShowPassword] = useState(false); const [errors, setErrors] = useState({}); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); // Validation const newErrors: { email?: string; password?: string } = {}; if (!email) newErrors.email = 'Email is required'; if (!password) newErrors.password = 'Password is required'; if (Object.keys(newErrors).length > 0) { setErrors(newErrors); return; } await onSubmit(email, password); }; return ( {/* Header */} Welcome Back Sign in to your account {/* Social Login */}