
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
react-native-password-strength-checker-fixed
Advanced tools
A react-native password input with strength checker for both IOS and Android. Fixed for React Native v0.59
A react-native password input with strength checker for both IOS and Android
This Component is built using Dropbox zxcvbn password strength estimator library
![]()
npm install react-native-password-strength-checker --save
Import this module:
import PasswordStrengthChecker from 'react-native-password-strength-checker';
Use as a component:
// Define streng level list
const strengLevels = [
{
label: 'Weak',
labelColor: '#fff',
widthPercent: '33',
innerBarColor: '#fe6c6c'
},
{
label: 'Weak',
labelColor: '#fff',
widthPercent: '33',
innerBarColor: '#fe6c6c'
},
{
label: 'Fair',
labelColor: '#fff',
widthPercent: '67',
innerBarColor: '#feb466'
},
{
label: 'Fair',
labelColor: '#fff',
widthPercent: '67',
innerBarColor: '#feb466'
},
{
label: 'Strong',
labelColor: '#fff',
widthPercent: '100',
innerBarColor: '#6cfeb5'
}
];
// Define too short object
const tooShort = {
enabled: true,
label: 'Too short',
labelColor: 'red'
};
render() {
return (
...
<PasswordStrength
secureTextEntry
minLength={4}
ruleNames="symbols|words"
strengthLevels={strengthLevels}
tooShort={tooShort}
minLevel={0}
barWidthPercent={65}
showBarOnEmpty={true}
barColor="#ccc"
onChangeText={(text, isValid) => this.setState({ password: { value: text, isValid: isValid } })}
/>
)
}
0{ ruleNames: 'lowerCase|upperCase|digits|symbols' }{ minLevel: 2} { tooShort: { enabled: false, labelColor: '#fff', label: 'Too short', widthPercent: '33', innerBarColor: '#fe6c6c' } } { strengthLevels: [ { label: 'Weak', labelColor: '#fff', widthPercent: '33', innerBarColor: '#fe6c6c' }, { label: 'Weak', labelColor: '#fff', widthPercent: '33', innerBarColor: '#fe6c6c' }, { label: 'Fair', labelColor: '#fff', widthPercent: '67', innerBarColor: '#feb466' }, { label: 'Fair', labelColor: '#fff', widthPercent: '67', innerBarColor: '#feb466' }, { label: 'Strong', labelColor: '#fff', widthPercent: '100', innerBarColor: '#6cfeb5' } ] }This component uses the same props as . Below are additional props for this component:
| Prop | Type | Optional | Defaul | Description |
|---|---|---|---|---|
minLength | number | Yes | 0 | Min length for password |
ruleNames | string | Yes | Above | List of rule name to check password |
strengLevels | object array | Yes | Above | List of password strength level with label, label color, percentage of width, bar color |
tooShort | object | Yes | Above | enabled, label, label color, percentage of width, bar color for too short |
minLevel | number | Yes | 2 | Min level to pass password validation |
inputWraperStyle | object | Yes | Style for wrapped password input | |
inputStyle | object/style | Yes | Style for password input | |
strengthWrapperStyle | object/style | Yes | Style for wrapped password strength bar and description | |
strengthBarStyle | object/style | Yes | Style for password strength bar | |
innerStrengthBarStyle | object/style | Yes | Style for password strength bar based on strength level | |
strengthDescriptionStyle | object/style | Yes | Style for password strength description | |
barColor | string | Yes | '#ffffff' | Color of filled password strength bar |
barWidthPercent | number | Yes | 70 | Percentage of password strength bar width |
onChangeText | function | No | Trigger when user inputs and password input finishes validation. Returns value and validation result | |
showBarOnEmpty | boolean | Yes | true | Only show strength bar when input is empty or not |
Strength level object:
| Property | Type | Description |
|---|---|---|
label | string | Label for strength level description |
labelColor | string | Color for strength level description label |
widthPercent | number | Percentage of width for inner strength level bar |
innerBarColor | string | Color for inner strength level bar |
Too short object:
| Property | Type | Description |
|---|---|---|
enabled | boolean | Enable too short description |
label | string | Label for strength level description |
labelColor | string | Color for strength level description label |
widthPercent | number | Percentage of width for inner strength level bar |
innerBarColor | string | Color for inner strength level bar |
See EXAMPLE
git clone https://github.com/ttdung11t2/react-native-password-strength-checker.git
cd react-native-password-strength-checker/example
npm install
react-native run-ios / react-native run-android
react-native-password-strength-checker is released under the MIT license. See LICENSE for details.
Any question or support will welcome.
FAQs
A react-native password input with strength checker for both IOS and Android. Fixed for React Native v0.59
We found that react-native-password-strength-checker-fixed demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.