my-otp-input
v1.6.0
Published
A fully customizable, one-time password input component for the web built with Angular.
Downloads
23
Maintainers
Readme
ng-otp-input
A fully customizable, one-time password input component for the web built with Angular.
Stackbliz Demo
Installation
npm install --save ng-otp-input
Usage
Add NgOtpInputModule to imports app.module.ts
something like
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { NgOtpInputModule } from 'ng-otp-input';
@NgModule({
declarations: [AppComponent],
imports: [ BrowserModule,
NgOtpInputModule],
bootstrap: [AppComponent]
})
Add component to your page:
<ng-otp-input (onInputChange)="onOtpChange($event)" [config]="{length:5}"></ng-otp-input>
API
Config options
Contributing
Feel free to open issues and pull requests!
License
MIT