Componentform1.12 KB gzipZero dependencies

Forgot Password

Password reset flow: email input transitions to animated sent confirmation.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add forgot-password

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { ForgotPassword } from "@/components/ui/forgot-password"; <ForgotPassword />

Source code

forgot-password.tsx + 1 helper

Zero third-party dependencies (2 local files shown in tabs below).

tsxforgot-password.tsx76 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface ForgotPasswordProps extends React.HTMLAttributes<HTMLDivElement> {  onSend?: (email: string) => void;} /** Forgot password flow: email submission to confirmation state. */export function ForgotPassword({ onSend, className, ...props }: ForgotPasswordProps) {  const [email, setEmail] = React.useState("");  const [sent, setSent] = React.useState(false);  const valid = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);   return (    <div className={cn("w-full max-w-sm", className)} {...props}> 

Props

PropTypeDescription
onSend(email: string) => voidCallback invoked on send.