DS0
Patterns

Forgot Password Form

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

Overview

The ForgotPasswordForm recipe provides a two-state password reset flow. The form view shows an email field and submit button. The success view shows a confirmation message with a "back to login" action.

Reset password

We'll send you a reset link

Usage

import { ForgotPasswordForm } from '@/recipes/forgot-password-form';

<ForgotPasswordForm
  onSubmit={({ email }) => sendResetEmail(email)}
  onBack={() => navigate('/login')}
/>

Success State

<ForgotPasswordForm
  onSubmit={handleSubmit}
  isSuccess={true}
  onBack={() => navigate('/login')}
/>

API Reference

PropTypeDefaultDescription
onSubmit(data: { email: string }) => voidSubmit handler
onBack() => voidBack to login handler
isLoadingbooleanfalseLoading state
isSuccessbooleanfalseShows success message
errorstringError message
classNamestringAdditional CSS classes

On this page