Skip to Content

🔐 Forgot Password

A fully customizable, ready-to-use screen for requesting a password reset via email. Built for React Native OTT-style apps with polished visuals, validation, theming, and flexibility.


✨ Features

  • 📧 Email input with react-hook-form validation
  • 🎨 Theming support (light/dark)
  • 🧹 Customizable texts, title, logo, and background
  • 🖼️ Gradient & background image support
  • 🔄 Submit button with loading state
  • 🔧 Render props for custom logo, buttons, and footer

📸 Preview

Forgot-Password-Light
Forgot-Password-Dark

📡 API Call

⚙️ First, setup the getZezoOtt API client: API Client Setup
🔗 Call getZezoOtt().auth.forgotPassword() the send a forgot password link to the user’s email.
📘 See method reference


👉 See Splash Screen Store Setup

🚀 Usage Example

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

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


⚙️ Props

📌 Core Configuration

PropTypeDescription
titlestringTitle displayed above the form
onSubmit(values: { email: string }) => Promise<void>Called on email submit
onTopBackBtnPress() => voidHandler for top back button
logoUristringOptional logo image URL
themeAppThemeOptional theme override
loadingSubmitBtnbooleanShow loading spinner on submit button
textTextConfigObject to override labels, placeholders, etc.

🎨 Styling Props

PropTypeDescription
containerStyleViewStyleStyle override for container
titleStyleTextStyleStyle override for title
formStyleViewStyleStyle for form wrapper
inputStyleTextStyleStyle for input text
inputContainerStyleViewStyleStyle for input container
topBackBtnStyleViewStyleStyle for top back button

🖼️ 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)

🧹 Custom Renderers

PropTypeDescription
renderLogo() => ReactNodeCustom renderer for the logo
renderForgetPasswordHeader() => ReactNodeCustom renderer above the forget password form
renderBottomInfoText() => ReactNodeCustom renderer bottom info text
renderSubmitButton({ onPress, disabled, loading }) => ReactNodeCustom submit button renderer
renderTopBackBtn({ onPress }) => ReactNodeCustom bottom info section

📝 Customizable Text

PropTypeDescription
textobjectCustomize field labels, placeholders, etc.
└─ emailLabelstringLabel above the email input field
└─ emailPlaceholderstringPlaceholder inside the email input
└─ forgetPasswordButtonstringText shown on the reset/submit button
└─ loadingSubmitBtnTextstringText shown while the form is submitting
└─ bottomInfoTextstringOptional text shown below the form

📝 Default Texts

These can be overridden using the text prop:

{ emailLabel: 'Email', emailPlaceholder: 'Enter your email', loadingSubmitBtnText: 'Processing...', forgetPasswordButton: 'Send Reset Link' }

🦪 Validation Rules

  • Required: User must enter an email
  • Valid Format: Must match /^\S+@\S+\.\S+$/

📀 Layout Overview

  • 🔙 Top Back Button (optional)
  • 🖼️ Logo (optional)
  • 📝 Title
  • 📧 Email Input Field
  • 🔘 Submit Button
  • ℹ️ Bottom Info Text (optional)
  • ⌨️ Keyboard-aware, responsive design

✍️ Created by Naresh Dhamu – Powered by ZezoSoft

Last updated on