0.1.3 • Published 4 years ago

ngx-password-visible-input v0.1.3

Weekly downloads
19
License
MIT
Repository
-
Last release
4 years ago

NgxPasswordVisibleInput

Angular Material password visible input. Formly support.

Install

npm i ngx-password-visible-input

Usage

There are two operating modes:

  • mousedown: the password is shown only when the view button is pressed (default).
  • toggle: the visibility of the password is toggled when the view button is pressed.

Button color can be controled by the color property ( 'primary' | 'accent' | 'warn' | '' ) and can be raised.

    <ngx-password-visible-input [mode]="mode" [color]="color" [raised]="raised" >
      <input type="password" placeholder="Insert password" [(ngModel)]="pwd" />
    </ngx-password-visible-input>

Formly support is avaible through FormlyFieldPasswordVisibleInputComponent. Must be installed in FormlyModule by the library user:

    FormlyModule.forRoot({
      types: [
        { name: 'visiblePassword', component: FormlyFieldPasswordVisibleInputComponent, wrappers: ['form-field'] }
      ],
    })

Demo

See https://gerardcarbo.github.io/ngx-password-visible-input/

License

MIT