1.3.0 • Published 2 years ago

react-otp-module v1.3.0

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

react-otp-module

npm version npm npm All Contributors

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

see here

Live Demo

CodeSandbox

Installation

NPM

To install the latest stable version:

npm install --save react-otp-module

Basic usage:

import React, { useState } from 'react'
import OtpInput from 'react-otp-module'

const App = () => {
  const [otp, setOtp] = useState()
  return (
    <form>
      <label htmlFor='otp'>Enter your OTP here</label>
      <OtpInput
        id="otp"
        value={otp}
        onChange={setOtp}
        numInputs={6}
        separator={<span className='px-2'></span>}
        inputStyle='otp__input'
        placeholder='------'
        isInputNum={true}
      />
    </form>
  )
}

export default App

Props

License

NPM

Contributors ✨

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT © jagannath-swarnkar

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago