Customizable Pincode Input Component – angular-code-input

Author: AlexMiniApps
Views Total: no views
Official Page: Go to website
Publish Date: May 20, 2020
License: MIT

Description:

An easy and customizable pincode (one-time password) input component for Angular based web & mobile applications.

Installation:

# NPM
$ npm install angular-code-input --save

Basic usage:

Import the component.

import { CodeInputModule } from 'angular-code-input';
@NgModule({
  imports: [
    CodeInputModule
  ]
})

Add the component to the template.

<code-input 
  [isCodeHidden]="false"
  [isNonDigitsCode]="false"
  [codeLength]="4"
  (codeChanged)="onCodeChanged($event)"
  (codeCompleted)="onCodeCompleted($event)">
</code-input>

All Default options:

// the number of codes
codeLength = 4;

// digits only or not
isNonDigitsCode = false;

// hides the code
isCodeHidden = false;

// moves the focus to the prev slot after clearing
isPrevFocusableAfterClearing = true;

// input type
inputType = 'tel';

// initial code
code?: string | number;

Preview:

Customizable Pincode Input Component - angular-code-input


You Might Be Interested In:

Add Comment