ResetPasswordForm

Choose a new password. The checklist ticks as rules are met, the second field says when it matches, and a rejected save shakes the form and shows why. Auth.

Open playground

Choose a new password

You will be signed out of other devices.

Use at least 8 characters

4 to go

  • At least 8 characters, not met
  • An upper and a lower case letter, not met
  • A number, not met
  • A symbol, like ! or &, not met
Use at least 8 characters

About

ResetPasswordForm is a React component in the Auth category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { ResetPasswordForm } from "@ashutoshswamy/smoui" and set onSubmit, title, minLength.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { ResetPasswordForm } from "@ashutoshswamy/smoui";

<ResetPasswordForm onSubmit={(password) => api.resetPassword(token, password)} />

Props 3

onSubmit

Resolve to succeed. Throw an Error to show its message.

(password: string) => void | Promise
title / description

Heading and the line under it.

string
minLength

Fewest characters.

numberdefault 8