Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular7-pincode

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular7-pincode

a simple directive for otp input template like on mobile otp input template

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Angular Custom OTP Input-Template

Custom otp-input template for Angular, it look likes otp-input template as mobile.

Table of Contents

  • Installation
  • Usage
  • Options
  • Callback
  • Example
  • Issues
  • Author

Installation

NPM

npm i -S angular7-pincode

Usage

Import Angular7PincodeModule in your module

import { Angular7PincodeModule } from 'angular7-pincode';

@NgModule({
  imports: [
    // ...
    Angular7PincodeModule
  ]
})

In your template

<angular7-pincode >
</angular7-pincode>

Options

directive inputs

  • [size]: number length of otp input, default 4

  • [class]: string your custom class on otp input

  • [isOnlyNumeric]: boolean take only as numeric value if true, default false

Callback functions

  • (onFullFill): function return a otp string after all otp enter and return null on every backspace

examples

default settings

<angular7-pincode (onFullFill)="onFullFill($event)">
</angular7-pincode>
onFullFill(data:any){
  console.log(data)
}

with size and custom class option

<angular7-pincode [size]="6" [class]="your-class" (onFullFill)="onFullFill($event)">
</angular7-pincode>
onFullFill(data:any){
  console.log(data)
}

with option isOnlyNumeric

<angular7-pincode [isOnlyNumeric]="true" (onFullFill)="onFullFill($event)">
</angular7-pincode>
onFullFill(data:any){
  console.log(data)
}

Issues

If you identify any errors in the library, or have an idea for an improvement, please open an issue.

Author

Keywords

FAQs

Package last updated on 22 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc