Code Monkey home page Code Monkey logo

react-password-strength-bar's Introduction

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[]

  • isRequired: false
  • default: ['#ddd', '#ef4836', '#f6b44d', '#2b90ef', '#25c281']

scoreWords: ReactNode[]

  • isRequired: false
  • default: ['weak', 'weak', 'okay', 'good', 'strong']

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.

react-password-strength-bar's People

Contributors

lannex avatar dependabot[bot] avatar jtbrinkmann avatar jaycanuck avatar pjhul avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.