Skip to content

LoginScreen

LoginScreen is a ready-to-use authentication screen. It combines AuthLayout (the full-screen shell) with AuthForm (the controlled email/password form) and wires in client-side validation.

  • Renders AuthLayout in login mode with a logo, title, and subtitle slot
  • Renders AuthForm in mode="login" with email and password fields
  • Validates on submit: empty fields and short passwords surface inline errors via emailError/passwordError props
  • Provides a secondary link (“Don’t have an account? Sign up”) that switches to register mode
src/screens/LoginScreen.tsx

LoginScreen is a complete screen — copy it into your project and wire onSuccess to your navigation or auth handler.

import { LoginScreen } from '@/screens/LoginScreen';
export default function AuthScreen() {
return (
<LoginScreen
onSuccess={(email) => navigation.navigate('Home')}
/>
);
}
PropTypeDescription
onSuccess(email: string) => voidCalled when the form passes validation
initialEmailstringPre-fill the email field
FieldRuleError message
EmailMust contain @”Enter a valid email address”
PasswordMust be ≥ 8 characters”Password must be at least 8 characters”

LoginScreenAuthLayout (template) → AuthForm (organism) → FormField × 2 (molecule) → Input (atom)