Strength Meter

Reports how strong a password is, in three steps and one word.

Weak

Configurations

Supported configurations for this component.

Configurations

3 examples
Weak

Weak

Medium

Medium

Strong

Strong

Add to your project

One command adds this component to your project.

1

Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.

npx shadcn@latest add @aicanvas/••••••••••••

Light and dark both come with the install and follow the dark class on <html>, the shadcn dark mode setup (next-themes with attribute="class").

Props

Every prop this component accepts. Any other prop is forwarded to the underlying element.

PropTypeDefaultDescription
valuereqstring-The password being judged. The meter reads the value itself instead of taking a score, so the screen cannot report a strength the form disagrees with.
minLengthnumber12Below this many typed characters the password is Weak, whatever else it contains. Set it to the same number the form actually enforces.
strongLengthnumber16At this many typed characters the password is Strong on length alone. Between the two bounds, three of the four character families are what reach Strong.
classNamestring-Extra classes merged onto the root element.
styleReact.CSSProperties-Inline styles merged onto the root element.

More Andromeda Pro components