GitHub

ChangePasswordForm

A form block for updating account passwords with current password verification and strength requirements.

Loading...

Installation

pnpm add @corew500/ui

Usage

import { ChangePasswordForm } from '@corew500/ui/blocks/change-password-form'

<ChangePasswordForm
  onFormSubmit={(data) => handleChangePassword(data)}
  onCancel={() => router.back()}
  title="Change Password"
  description="Your new password must meet all requirements."
/>

API Reference

Props

PropTypeDefaultDescription
onFormSubmit(data: ChangePasswordFormData) => voidCalled when the form is submitted
onCancel() => voidCalled when cancel button is clicked
loadingenumfalseWhether the form is in a loading state
successenumfalseWhen true, shows success state instead of form
glowenumfalseEnable glow effects
titlestringChange password
descriptionstringEnter your current password and choose a new one.
successTitlestringPassword changed!
successDescriptionstringYour password has been updated successfully.
successActionenum
labels{ currentPassword?: string; newPassword?: string; confirmPassword?: string; }{}
placeholders{ currentPassword?: string; newPassword?: string; confirmPassword?: string; }{}
buttonLabels{ submit?: string; loading?: string; cancel?: string; }{}
errors{ currentPassword?: string; newPassword?: string; confirmPassword?: string; general?: string; }{}
features{ passwordToggle?: boolean; passwordRequirements?: boolean; showCancel?: boolean; }{}
passwordRequirementsPasswordRequirement[]Custom password requirements