Reset Password Form
BlockBasic Usage
Loading...
Installation
pnpm add @corew500/uiUsage
import { ResetPasswordForm } from "@corew500/ui/blocks/reset-password-form"
<ResetPasswordForm>Content</ResetPasswordForm>API Reference
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| action* | UpdatePasswordAction | — | Server action for updating password. Import from '@corew500/feature-auth/server' and pass as prop. @example ```tsx import { ResetPasswordForm } from '@corew500/feature-auth' import { updatePassword } from '@corew500/feature-auth/server' export default function Page() { return <ResetPasswordForm action={updatePassword} loginHref="/login" /> } ``` |
| validation | AuthValidationOptions | — | Validation configuration |
| locale | string | — | Locale for i18n-aware redirects |
| redirectTo | string | — | Custom redirect path after success |
| onSuccess | () => void | Promise<void> | — | Called after password is successfully reset. Can be async - the form will await completion. |
| onAuthError | (error: AuthFormError) => void | — | Called when password reset fails. Receives the error code (if available) and message. |
| onSubmitStart | () => void | — | Called immediately before the form submits. Useful for analytics, global loading states, or last-minute checks. |