2.0.8 • Published 12 months ago

reactjs-otp-input v2.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

reactjs-otp-input

npm version npm npm All Contributors

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

see here

Support auto fill on mobile (safari, chrome....)

see here

Live Demo

Installation

NPM

To install the latest stable version:

npm install --save reactjs-otp-input@latest

Or yarn

yarn add reactjs-otp-input

Basic usage:

import React, { Component } from 'react';
import { OtpInput } from 'react-otp-input';

export default const App {
  const [otp, setOtp] = useState('');

  const handleChange = (otp) => setOtp({ otp });

  return <OtpInput value={otp} onChange={handleChange} numInputs={6} separator={<span>-</span>} />;
}

Development

To run the development server:

npm run dev

API

1.0.2

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

2.0.3

12 months ago

2.0.2

12 months ago

2.0.5

12 months ago

2.0.4

12 months ago

2.0.7

12 months ago

2.0.6

12 months ago

2.0.8

12 months ago

2.0.1

12 months ago

2.0.0

12 months ago

1.0.1

1 year ago

1.0.0

1 year ago