Gathering detailed insights and metrics for antd-password-input-strength
Gathering detailed insights and metrics for antd-password-input-strength
Gathering detailed insights and metrics for antd-password-input-strength
Gathering detailed insights and metrics for antd-password-input-strength
AntD Input component with password-strength indicator.
npm install antd-password-input-strength
Typescript
Module System
Node Version
NPM Version
TypeScript (96.01%)
JavaScript (3.99%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
88 Stars
67 Commits
8 Forks
2 Watchers
127 Branches
2 Contributors
Updated on Feb 27, 2025
Latest Version
2.0.1
Package Id
antd-password-input-strength@2.0.1
Unpacked Size
12.38 kB
Size
4.52 kB
File Count
5
NPM Version
8.3.0
Node Version
17.3.1
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
Antd Input Component with password-strength indicator.
Note: tai-password-strength is a rather large library. Use code splitting to only load the library when necessary.
1npm install --save antd-password-input-strength
or
1yarn add --save antd-password-input-strength
Note: antd and react/react-dom are peer dependencies. You should only use this library in a React/AntD project.
Use as a drop-in replacement for antd's Input:
1<Form> 2 <Form.Item label="Password"> 3 <PasswordInput /> 4 </Form.Item> 5</Form>
With Form.create()
:
1<Form> 2 <Form.Item label="Password"> 3 {this.props.form.getFieldDecorator("password", { 4 rules: [{ 5 required: true, 6 message: "Please enter your password" 7 }] 8 })(<PasswordInput />)} 9 </Form.Item> 10</Form>
With custom settings:
1<Form> 2 <Form.Item label="Password"> 3 <PasswordInput 4 settings={{ 5 ...defaultSettings, 6 height: 5 7 }} 8 9 onChange={() => console.log("Changed")} 10 size="large" 11 /> 12 </Form.Item> 13</Form>
With validation:
1function ValidationExample() { 2 const [level, setLevel] = useState(0) 3 4 const minLevel = 1; 5 const errorMessage = 'Password is too weak'; 6 7 return ( 8 <Form> 9 <Form.Item 10 name="test" 11 rules={[{ 12 validator: async () => { 13 return level >= minLevel ? Promise.resolve() : Promise.reject(errorMessage); 14 }, 15 message: errorMessage 16 }]} 17 > 18 <PasswordInput onLevelChange={setLevel} /> 19 </Form.Item> 20 </Form> 21 ); 22}
props | type | description |
---|---|---|
settings | PasswordInputSettings | Strength indicator display settings |
onLevelChange | (newLevel: 0 | 1 |
...props | InputProps | Pass additional properties to the underlying Input component |
props | type | description |
---|---|---|
colorScheme | ColorScheme | Modify the indicator's color scheme |
height | number | Change indicator bar height (in px) |
alwaysVisible | boolean | If false, the bar only appears if the input field isn't empty |
Default:
1{ 2 colorScheme: [...], 3 height: 3, 4 alwaysVisible: false 5}
props | type | description |
---|---|---|
levels | string[] | Array of CSS color codes for the different strength levels: levels[0] = weakest , levels[4] = strongest |
noLevel | string | CSS color code for non-colored strength indicator bars. |
Default:
1{ 2 levels: ["#ff4033", "#fe940d", "#ffd908", "#cbe11d", "#6ecc3a"], 3 noLevel: "lightgrey" 4}
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/9 approved changesets -- score normalized to 0
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
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
12 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
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