reactjs-otp-input
v2.0.10
Published
A fully customizable, one-time password input component for the web built with React
Downloads
7,390
Maintainers
Readme
A fully customizable, one-time password input component for the web built with React.
Support auto fill on mobile (safari, chrome....)
Installation
To install the latest stable version:
pnpm install reactjs-otp-input@latest
Basic usage:
import React, { Component } from 'react';
import { OtpInput } from 'reactjs-otp-input';
const App = () => {
const [otp, setOtp] = useState('');
const handleChange = (otp) => setOtp(otp);
return <OtpInput value={otp} onChange={handleChange} numInputs={6} separator={<span>-</span>} />;
};
To run the development server:
npm run dev
API
About
Gia Hung – hung.hg