1.6.0 • Published 6 years ago

my-otp-input v1.6.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

ng-otp-input

A fully customizable, one-time password input component for the web built with Angular.

GIPHY

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