Skip to Content

📝 SignUp

A fully customizable and reusable signup screen built for React Native apps. Includes form validation, dark/light theme support, and full layout control via render props.


✨ Features

  • 👤 Username, email, password, confirm password fields
  • ✅ Real-time validation using react-hook-form
  • 🌗 Light/dark mode with theming support
  • 🖼️ Background image & gradient overlay support
  • 🎨 Customizable UI (logo, headers, back button, etc.)
  • 🔁 Login redirect and flexible button rendering

📸 Preview

SignUp-Light
SignUp-Dark

🧠 Authentication Note

⚙️ First, setup the getZezoOtt API client: API Client Setup
🔗 Call getZezoOtt().auth.signUp() to register a new user.
📘 See method reference


👉 See Splash Screen Store Setup

🚀 Usage

SignUp.tsx
import React from "react"; import { Auth } from "@zezosoft/zezo-ott-react-native-ui-kit"; import { goBack, navigate } from "@ZezoOtt/utils/NavigationUtil"; import { Route } from "@navigation/routes"; import { useSplashStore } from "@ZezoOtt/store/splashStore"; const SignUpScreen = () => { const { splash } = useSplashStore.getState(); return ( <Auth.SignUp logoUri={splash.logo} title="Create Your Account" onSubmit={(data) => { console.log(data). //call your api endpoint method }} onTopBackBtnPress={() => goBack()} backgroundImage={{ source: splash.login_poster, gradientSplitBackground: 0.4, }} onLogin={() => navigate(Route.Register)} /> ); }; export default SignUpScreen;

🔗 See related route definition: Route enum from @navigation/routes.ts


🔧 Props

📌 Core Configuration

PropTypeDescription
titlestringTitle displayed above the signup form
onSubmit(values: FormValues) => voidCalled when the signup form is submitted
onLogin() => voidCalled when user taps the “Login” link
onTopBackBtnPress() => voidHandler for top back button
logoUristringOptional logo image URL
loadingSubmitBtnbooleanShow loading spinner on signup button
themeAppThemeOptional theme override
minPasswordLengthnumberMinimum password length (default: 6)

🎨 Styling Props

PropTypeDescription
containerStyleViewStyleStyle override for main container
titleStyleTextStyleStyle override for title text
formStyleViewStyleStyle override for form wrapper
inputStyleTextStyleStyle override for input fields
inputContainerStyleViewStyleStyle override for input field wrapper
topBackBtnStyleViewStyleStyle override for top back button
loginTextPropsTextStyleStyle for the “Already have an account?” text
loginLinkTextPropsTextStyleStyle for the “Login” link

🧹 Custom Renderers

PropTypeDescription
renderLogo() => ReactNodeCustom renderer for the logo
renderSingUpHeader() => ReactNodeCustom renderer above the signup form
renderLoginPrompt() => ReactNodeCustom login prompt (instead of default text + link)
renderSubmitButton({ onPress, disabled, loading }) => ReactNodeCustom submit button renderer
renderTopBackBtn({ onPress }) => ReactNodeCustom back button renderer

🖼️ Background Image

PropTypeDescription
backgroundImageobjectBackground image settings
 └── sourcestring | nullImage URL or path
 └── resizeMode'cover' | 'contain' | 'stretch' | 'repeat'How the background image should resize
 └── onImageError(error: Error) => voidError handler when image fails to load
 └── gradientSplitBackgroundnumberPosition of gradient split (e.g. 0.4)

📝 Customizable Text

PropTypeDescription
textobjectCustomize field labels, placeholders, etc.
└─ usernameLabelstringLabel for username field
└─ usernamePlaceholderstringPlaceholder for username input
└─ emailLabelstringLabel for email field
└─ emailPlaceholderstringPlaceholder for email input
└─ passwordLabelstringLabel for password field
└─ passwordPlaceholderstringPlaceholder for password input
└─ confirmPasswordLabelstringLabel for confirm password field
└─ confirmPasswordPlaceholderstringPlaceholder for confirm password input
└─ loginPromptstringText prompting to log in
└─ loginLinkstringText for login action link
└─ signupButtonstringText for the submit/signup button
└─ loadingSubmitBtnTextstringText shown during signup loading state

🧪 Validation

  • 🧾 Username: required, min 3 characters
  • 📧 Email: required, must match format /^\S+@\S+\.\S+$/
  • 🔒 Password: required, min minPasswordLength
  • ✅ Confirm Password: must match password

📝 Default Texts

If text prop is not passed, the following values are used:

{ usernameLabel: 'Username', usernamePlaceholder: 'Enter your username', emailLabel: 'Email', emailPlaceholder: 'Enter your email address', passwordLabel: 'Password', passwordPlaceholder: 'Create a password', confirmPasswordLabel: 'Confirm Password', confirmPasswordPlaceholder: 'Re-enter your password', loginPrompt: 'Already have an account?', loginLink: 'Login', signupButton: 'Sign Up', loadingSubmitBtnText: 'Creating account...' }

✅ Summary

  • 🧩 Built with developer ergonomics in mind
  • 🔐 Validates all fields with fallback messaging
  • 🎨 Supports full theming and UI overrides
  • 🔄 Easily integrates with login flows

✍️ Created by Naresh Dhamu — Powered by ZezoSoft

Last updated on