Skip to main content
Version: 1.0.3

ResetPassword

Overview

The Reset Password Page provides a fully customizable password reset interface designed for modern web applications. It includes token validation, real-time password strength indicators, password matching validation, and a polished success state. The component features animated inputs with various visual variants, making it ideal for secure authentication flows that require a user-friendly password reset experience.

Preview

Reset Your Password

Enter your reset token and create a new secure password

💡 Hint: Check your email for the reset token. Token validation checks format and length.

Installation

ignix add component ResetPassword

Usage

  import { ResetPasswordPage } from "@src/components/templates/reset-password";

function ResetPassword() {
return (
<ResetPasswordPage
token=""
inputVariant="clean"
onSubmit={async (password, token) => {
const res = await fetch("/api/reset-password", {
method: "POST",
body: JSON.stringify({ password, token }),
});

if (!res.ok) {
throw new Error("Failed to reset password");
}
}}
onTokenValidate={(token) => {
// Custom validation logic
return token.length >= 6 && token.length <= 32;
}}
/>
);
}

Props

PropTypeDefaultDescription
tokenstring""Pre-filled reset token/code (optional)
inputVariant"clean"| "underline"| "floating"| "borderGlow"| "shimmer"| "particles"| "slide"| "scale"| "rotate"| "bounce"| "elastic"| "glow"| "shake"| "wave"| "typewriter"| "magnetic"| "pulse"| "flip"| "morph"| "spotlight"| "liquid"| "neon"| "origami"| "glitch"| "hologram"| "cosmic"| "borderBeam"| "gradientBorder"| "ripple"| "materialFloat"| "neonPulse"| "typewriterReveal"| "morphing"| "liquidBorder"| "particleField"| "glassmorphism"| "holographic3D"| "quantumParticles"| "premiumGlass"| "luxuryShimmer"| "materialRipple"| "cosmicField"| "premiumGradient""clean"Visual variant for input fields
onSubmit(password: string, token: string) => voidundefinedCallback when form is submitted with valid data
onTokenValidate(token: string) => booleanundefinedCustom token validation function (optional). Default checks if token length is between 6-32 characters
classNamestringundefinedAdditional CSS classes for styling (e.g., "dark" for dark theme)

Features

  • Token Validation: Built-in token validation with customizable validation logic
  • Password Strength Indicator: Real-time password strength calculation with visual feedback
  • Password Matching: Automatic validation to ensure passwords match
  • Animated Inputs: Support for various input variants with smooth animations
  • Success State: Polished success screen after successful password reset
  • Form Validation: Comprehensive form validation with error messages
  • Accessibility: Built with accessibility best practices in mind