GitHub

ForgotPasswordForm

A password reset request form block with email input and success state.

Loading...
CMSCMS Ready

The ForgotPasswordForm component accepts customizable title, description, and link props for CMS integration. Content editors can configure form text without code changes.

Basic Usage

import { ForgotPasswordForm } from "@corew500/features/auth"

<ForgotPasswordForm
  signInHref="/login"
/>

With Validation

Enable client-side validation with password requirements and real-time feedback.

<ForgotPasswordForm
  signInHref="/login"
  validation={{
    enableClientValidation: true,
    validationMode: "onBlur",
  }}
/>

The validation prop enables:

  • Real-time email format validation
  • Custom error messages
  • Enhanced UX with immediate feedback

With Glow Effect

Enable interactive glow effects on inputs and buttons.

<ForgotPasswordForm
  glow
  signInHref="/login"
/>

The glow effect adds:

  • Mouse-tracking radial gradient on input fields
  • Animated gradient underline on buttons that fades in on hover

Custom Content

<ForgotPasswordForm
  title="Reset your password"
  description="Enter your email and we'll send you a reset link"
  signInHref="/login"
  successTitle="Check your email"
  successDescription="We've sent you a password reset link"
/>

Loading State

<ForgotPasswordForm loading signInHref="/login" />

Custom Error Messages

<ForgotPasswordForm
  signInHref="/login"
  validation={{
    enableClientValidation: true,
    errorMessages: {
      email: {
        required: "Please enter your email address",
        invalid: "Please enter a valid email",
      },
    },
  }}
/>

Props

PropTypeDefaultDescription
onFormSubmit(data: ForgotPasswordFormData) => voidCalled when the form is submitted
loadingenumfalseWhether the form is in a loading state
successenumfalseWhen true, shows success state instead of form
glowenumfalseEnable glow effects
titlestringForgot password?
descriptionstringEnter your email address and we'll send you a link to reset your password.
successTitlestringCheck your email
successDescriptionstringWe've sent you a password reset link to your email address.
successSubDescriptionstringIf you don't see it, check your spam folder.
successActionenum
labels{ email?: string; }{}
placeholders{ email?: string; }{}
buttonLabels{ submit?: string; loading?: string; backToLogin?: string; }{}
errors{ email?: string; general?: string; }{}
backToLoginHrefstring#