Gathering detailed insights and metrics for react-password-checklist
Gathering detailed insights and metrics for react-password-checklist
Gathering detailed insights and metrics for react-password-checklist
Gathering detailed insights and metrics for react-password-checklist
react-password-checklist-custom
A React Component to display the success or failure of password strength rules, ideal for registration or password reset forms.
mui-password-checklist
A Material-UI password input with password strength checklist
react-password-checklist-lib
A React Component to display password situation
react-flexi-password-checklist
A flexible React component that validates user passwords against the custom password requirement checklist, in real-time.
A React Component to display the success or failure of password strength rules
npm install react-password-checklist
Typescript
Module System
Node Version
NPM Version
TypeScript (95.25%)
JavaScript (4.75%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
70 Stars
177 Commits
28 Forks
2 Watchers
4 Branches
7 Contributors
Updated on May 13, 2025
Latest Version
1.8.1
Package Id
react-password-checklist@1.8.1
Unpacked Size
24.20 kB
Size
6.55 kB
File Count
5
NPM Version
10.7.0
Node Version
20.15.0
Published on
Oct 15, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
31
A React Component to display the success or failure of password strength rules that updates as a user types.
npm install --save react-password-checklist
yarn add react-password-checklist
Note: react is a peer dependency. You should be using this in a React project.
import React, {useState} from "react"
import PasswordChecklist from "react-password-checklist"
const SignUp = () => {
const [password, setPassword] = useState("")
const [passwordAgain, setPasswordAgain] = useState("")
return (
<form>
<label>Password:</label>
<input type="password" onChange={e => setPassword(e.target.value)}>
<label>Password Again:</label>
<input type="password" onChange={e => setPasswordAgain(e.target.value)}>
<PasswordChecklist
rules={["minLength","specialChar","number","capital","match"]}
minLength={5}
value={password}
valueAgain={passwordAgain}
onChange={(isValid) => {}}
/>
</form>
)
}
import React, {useState} from "react"
import PasswordChecklist from "react-password-checklist"
const SignUp = () => {
const [password, setPassword] = useState("")
const [passwordAgain, setPasswordAgain] = useState("")
return (
<form>
<label>Password:</label>
<input type="password" onChange={e => setPassword(e.target.value)}>
<label>Password Again:</label>
<input type="password" onChange={e => setPasswordAgain(e.target.value)}>
<PasswordChecklist
rules={["minLength","specialChar","number","capital","match"]}
minLength={8}
value={password}
valueAgain={passwordAgain}
messages={{
minLength: "La contraseña tiene más de 8 caracteres.",
specialChar: "La contraseña tiene caracteres especiales.",
number: "La contraseña tiene un número.",
capital: "La contraseña tiene una letra mayúscula.",
match: "Las contraseñas coinciden.",
}}
/>
</form>
)
}
Customize the component to display only the rules you need in the desired order you wish to display them.
Valid if the password meets the minimum length. Requires minLength
prop to be included.
Valid if the password meets the maximum length. Requires maxLength
prop to be included.
Valid if the password contains a special character from this list.
Valid if the password contains a number.
Valid if the password contains a capital letter.
Valid if the password matches the confirm password valid. Requires valueAgain
prop to be included.
Valid if the password contains a letter (capital or lowercase)
Valid if the password contains a lowercase letter
Valid if the password and confirm passwords both contain any character. Requires valueAgain
prop to be included.
Valid if the password contains both a capital letter and lowercase letter.
Valid if the password does not contain a space.
Prop | Description | Type | Required | Default |
---|---|---|---|---|
rules | Rules to display in the order desired. Options are minLength , maxLength , specialChar ,number , letter , capital , match , lowercase , notEmpty , capitalAndLowercase , noSpaces | array | yes | |
value | Current potential password | string | yes | |
valueAgain | Current potential password confirmation | string | Only withmatch rule | |
minLength | Minimum Password Length | number | Only withminLength rule | |
maxLength | Maximum Password Length | number | Only withmaxLength rule | |
specialCharsRegex | Regular expression to be used to validate the specialChars rule | RegExp | /[~`¿¡!#$%\^&*€£@+÷=\-\[\]\\';,/{}\(\)|\\":<>\?\.\_]/g | |
onChange | Callback that is triggered when the validity of any rule changes. | function | (isValid: boolean, failedRules: string[]) => {} | |
messages | Object with keys as rules, and values as strings to use as the message to be displayed | object | ||
className | Class applied to the entire component | string | ||
rtl | apply rtl styles | boolean | false | |
hideIcon | Remove the SVG icon element | boolean | false | |
style | Inline styles applied to the outer component wrapper | object | ||
iconSize | Size of ✔ or 𐄂 icon | number | 18 | |
validTextColor | Color of valid text | string | Inherited color | |
invalidTextColor | Color of invalid text | string | Inherited color opacity 0.5 | |
validColor | Color of checkmark icon. Not used with custom iconComponents | string | #4BCA81 | |
invalidColor | Color of X icon. Not used with custom iconComponents | string | #FF0033 | |
iconComponents | Optional object containing keys of ValidIcon and InvalidIcon with a React Node to be displayed in place of icon. Both icons required if used. Example: {ValidIcon: <img src="valid.png" />, InvalidIcon: <img src="invalid.png" />} | object |
.valid
- Valid Message.invalid
- Invalid MessagePRs are welcome for additional functionality! See the Run Locally section below. Pull requests should include unit tests and potentially storybook stories to cover the updates. Thanks!
npm i
to install dependencies.
npm run storybook
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/16 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
10 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More