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-strengthfor yarn users
yarn add @rodrigowpl/react-password-strengthUsage
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(ornpm i); - Run
yarn storybook(ornpm run storybook) to storybook onhttp://localhost:6006 - Run
yarn storybook:build(ornpm run storybook:build) for docs build (files will be) generated in thedocsdirectory) - Run
yarn build(ornpm run build) for production build (files will be generated in thedistdirectory)
Scripts
yarn build (or npm run build): Build project to productionyarn storybook (or npm run storybook): Run Storybook on6006portyarn storybook:build: Build Storybook to static filesnpm run pub: Publish to npm
License
MIT © Rodrigo Wippel
