0.0.17 • Published 1 year ago

@dustyjay/otp-input v0.0.17

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Otp Input

A light-weight package to display otp inputs with the option of customizing the input to suit your project designs. The package does not contain any styling which leaves that power in your hands.

Installation

Using npm
$ npm install @dustyjay/otp-input
Using yarn
$ yarn add @dustyjay/otp-input

Usage

import { OtpInput } from "@dustyjay/otp-input"

<OtpInput
  numberOfInputs={5}
  onComplete={(value) => console.log('Completed OTP is', value)}
/>

Props

NameTypeDescription
numberOfInputsnumberThe number of otp inputs to be displayed. Required
inputStyleReact.CSSPropertiesStyling properties for all input boxes. Optional
inputClassstringClass name(s) for all input boxes. Optional
wrapperStyleReact.CSSPropertiesStyling properties for input wrapper. Optional
wrapperClassstringClass name(s) for input wrapper. Optional

Events

NameDescription
onInputThe callback is triggered as user inputs any character. arg contains the current characters. Optional
onCompleteThe callback is triggered when all inputs are completely filled. arg contains the complete characters entered. Optional

NPM Package

GitHub Repo: https://github.com/dustyjay/otp-input

0.0.13

1 year ago

0.0.14

1 year ago

0.0.15

1 year ago

0.0.16

1 year ago

0.0.17

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago