0.0.5 • Published 8 months ago
react-otp-input-fields v0.0.5
react-otp-input-fields
Developed a customizable one-time password (OTP) component built with React. The component allows users to enter OTPs and can be customized to match the look and feel of the website, and it can also be added features such as auto-focus and auto-fill.
Installation
$ npm install --save react-otp-input-fields
Basic Usage:
import React, { useState } from "react";
import OtpInput from "react-otp-input-fields";
export default function App() {
const [otp, setOtp] = useState("");
return (
<OtpInput
value={otp}
otpFields={4}
onCodeFilled={setOtp}
placeholder={"-"}
/>
);
}