Skip to content

Latest commit

 

History

History
62 lines (42 loc) · 1.82 KB

README.md

File metadata and controls

62 lines (42 loc) · 1.82 KB

react-password-strength

React component with zxcvbn

You can see running example: https://rodrigowp.github.io/react-password-strength/

Installation

for npm users

npm i --save @rodrigowpl/react-password-strength

for yarn users

yarn add @rodrigowpl/react-password-strength

Usage

import { PasswordStrength } from '@rodrigowpl/react-password-strength'

<PasswordStrength
  value='whatever-password'
/>

Props

Property Type Default Description
width number 300 Set width of container element
value string undefined Value that will be validate
strengthColors object STRENGTH_COLOR Custom strength colors
strengthText object STRENGTH_TEXT Custom strength texts

Contributing

Dependencies:

  • Node.js >= v8;

Up and running

  • Install dependencies: yarn (or npm i);
  • Run yarn storybook (or npm run storybook) to storybook on http://localhost:6006
  • Run yarn storybook:build (or npm run storybook:build) for docs build (files will be) generated in the docs directory)
  • Run yarn build (or npm run build) for production build (files will be generated in the dist directory)

Scripts

  • yarn build (or npm run build): Build project to production
  • yarn storybook (or npm run storybook): Run Storybook on 6006 port
  • yarn storybook:build: Build Storybook to static files
  • npm run pub: Publish to npm

License

MIT © Rodrigo Wippel