1.0.5 • Published 3 years ago

malkeet-otp-react_2 v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

malkeet-otp-react_2

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

Install

Install using npm install malkeet-otp-react_2

Usage

import {OTP} from 'malkeet-otp-react_2'

Basic usage:

import { OTP } from "malkeet-otp-react_2";
function App() {
  const onOTPChangeHandler = (otp) => {
    console.log({ otp });
  };
  return (
    <div className="App">
      <OTP
        length={6}
        className="otpInput"
        onOTPChangeHandler={onOTPChangeHandler}
      />
    </div>
  );

OTP props

NameTypeDescription
lengthnumberNumber of OTP inputs to be rendered.
classNamestringclassName
onOTPChangeHandlerfunctionReturns OTP code typed in inputs.
1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago