0.4.1 • Published 2 years ago

react-password-strength-bar v0.4.1

Weekly downloads
4,559
License
MIT
Repository
github
Last release
2 years ago

react-password-strength-bar

A React component that displays the password strength bar

NPM

Version Build Coverage Status code style: prettier License

Gif

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.
  • The input tag is not included. If you want to include the input tag, use the mmw/react-password-strength package.

Install

$ npm install react-password-strength-bar
$ yarn add react-password-strength-bar

Usage

import PasswordStrengthBar from 'react-password-strength-bar';

const { password } = this.state;
<PasswordStrengthBar password={password} />

Props

className: string

  • isRequired: false
  • default: undefined

style: object

  • isRequired: false
  • default: undefined

scoreWordClassName: string

  • isRequired: false
  • default: undefined

scoreWordStyle: object

  • isRequired: false
  • default: undefined

password: string

  • isRequired: true
  • default: ''

userInputs: string[]

  • isRequired: false
  • default: []

barColors: string[]

scoreWords: ReactNode[]

minLength: number

  • isRequired: false
  • default: 4

shortScoreWord: ReactNode

  • isRequired: false
  • default: 'too short'

onChangeScore: (score, feedback) => void

  • isRequired: false
  • default: undefined

Browser support

Tested with modern browsers.

License

the MIT license.

0.4.1

2 years ago

0.4.0

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago