1.0.2 • Published 2 years ago

react-pwstrength-bar v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

react-pwstrength-bar

A React component that displays the password strength bar

Note

  • This package is based on zxcvbn. zxcvbn is a powerful library, but its size is very large. I recommend you use this package by Code-Splitting.

Install

$ npm install react-pwstrength-bar
$ yarn add react-pwstrength-bar

Usage

import PasswordStrengthBar from 'react-pwstrength-bar';

const password ;
<PasswordStrengthBar password={password} />

Props

PropTypeDefaultRequiredDescriptionExample
passwordstring''TrueThis is password that bar color and word is set based on itjdhgfsd
scoreWordsstring5"Weak", "Medium", "Normal", "Strong", "Very Strong"Falsedetermine the word that is written on the barany string array with length=5
barColorsstring5"#ed5565", "#dd772c", "#f8ac59", "#2b90ef", "#25c281"Falsedetermine the color of the barany string array with length=5
widthstring'100%'Falsewidth of the baryou can set it by % or px like "60%" or "500px"
heightstring'20px'Falseheight of the bar"30px"
shapeEdgestring"circle"Falsethe shape of the edge of the barit can be "circle" or "square"
backgroundColorstring"#ddd"Falsethe default color of the barany color like "#000"
scoreWordClassstring''Falsethe class to set font and any style of the word that is written on the barany string name of a css class

Browser support

Tested with modern browsers.

License

the ISC license.