Password Strength Meter For Angular

Author: maykon-oliveira
Official Page: Go to website
Publish Date: October 26, 2020
License: MIT

Description:

A password strength meter for Angular used to calculate and display the strength and/or feedback of a provided password.

Based on the latest Zxcvbn.js Password Strength Estimation library.

How to use it:

1. Install the package and import the Password Strength Meter.

# Yarn
$ yarn add ngx-password-strength-meter

# NPM
$ npm i ngx-password-strength-meter --save
import { NgxPasswordStrengthMeterModule } from 'ngx-password-strength-meter';
@NgModule({
  declarations: [AppComponent, ...],
  imports: [NgxPasswordStrengthMeterModule, ...],
  bootstrap: [AppComponent]
})
export class AppModule {
}

2. Add the Password Strength Meter component to the app.

<ngx-password-strength-meter [password]="password"></ngx-password-strength-meter>

3. Config the Password Strength Meter with the following options:

@Input() password: string;
@Input() min = 8;
@Input() max = 30;
@Input() enableLengthRule = true;
@Input() enableFeedback = false;
@Input() colors: string[] = [];
@Output() strengthChange = new EventEmitter<number>();

Preview:

Password Strength Meter For Angular


You Might Be Interested In:

Tags:

Add Comment