1.0.2 • Published 2 years ago

react-otp-input-type v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-otp-input-type

A lightweight and customizable continuous-single-input component, which can be used for OTP/pass-code style input purposes for React apps.

image

Working Demo

Installing as a package

NPM

npm i react-otp-input-type

How to use?:

import React, { useState } from 'react';
import { OTPInputField } from 'react-otp-input-type';

function App() {
  const [otp, setOtp] = useState('');
  
  return (
    <div className="App">
      <OTPInputField 
        numOfInputs = {6}
        handleChange = {setOtp}
      />

      <p>Entered value is: {otp}</p>
    </div>
  );
}

Props

License

MIT