# react-pwstrength-bar

> This package is based on zxcvbn. zxcvbn is a powerful library

Latest version **1.0.2** (published 2021-11-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-pwstrength-bar
pnpm add react-pwstrength-bar
yarn add react-pwstrength-bar
bun add react-pwstrength-bar
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-11-25 |
| First published | 2021-11-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 838.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Leila Zarban |
| Maintainers | leila.zarban |
| Keywords | react, password, strength |

## Links

- npm: https://www.npmjs.com/package/react-pwstrength-bar
- Repository: https://github.com/LeilaZarban/react-pwstrength-bar
- Homepage: https://github.com/LeilaZarban/react-pwstrength-bar#readme
- Issues: https://github.com/LeilaZarban/react-pwstrength-bar/issues
- npm.io page: https://npm.io/package/react-pwstrength-bar

## Dependencies (2)

- [zxcvbn](https://npm.io/package/zxcvbn.md) ^4.4.2
- [styled-components](https://npm.io/package/styled-components.md) ^5.3.3

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2021-11-25
- 1.0.1 — 2021-11-25

## README

# react-pwstrength-bar

A React component that displays the password strength bar

## Note

- This package is based on [zxcvbn](https://github.com/dropbox/zxcvbn).
  `zxcvbn` is a powerful library, but its size is very large.
  I recommend you use this package by [Code-Splitting](https://reactjs.org/docs/code-splitting.html).

## Install

```
$ npm install react-pwstrength-bar
```

```
$ yarn add react-pwstrength-bar
```

## Usage

```js
import PasswordStrengthBar from 'react-pwstrength-bar';

const password ;
<PasswordStrengthBar password={password} />
```

## Props

| Prop            | Type      | Default                                                 | Required | Description                                                                | Example                                         |
| --------------- | --------- | ------------------------------------------------------- | -------- | -------------------------------------------------------------------------- | ----------------------------------------------- |
| password        | string    | ''                                                      | True     | This is password that bar color and word is set based on it                | `jdhgfsd`                                       |
| scoreWords      | string[5] | ["Weak", "Medium", "Normal", "Strong", "Very Strong"]   | False    | determine the word that is written on the bar                              | any string array with length=5                  |
| barColors       | string[5] | ["#ed5565", "#dd772c", "#f8ac59", "#2b90ef", "#25c281"] | False    | determine the color of the bar                                             | any string array with length=5                  |
| width           | string    | '100%'                                                  | False    | width of the bar                                                           | you can set it by % or px like "60%" or "500px" |
| height          | string    | '20px'                                                  | False    | height of the bar                                                          | "30px"                                          |
| shapeEdge       | string    | "circle"                                                | False    | the shape of the edge of the bar                                           | it can be "circle" or "square"                  |
| backgroundColor | string    | "#ddd"                                                  | False    | the default color of the bar                                               | any color like "#000"                           |
| scoreWordClass  | string    | ''                                                      | False    | the class to set font and any style of the word that is written on the bar | any string name of a css class                  |

## Browser support

Tested with modern browsers.

## License

the ISC license.

---
_Source: https://npm.io/package/react-pwstrength-bar · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
