An autocomplete verification code input with react
react-input-verification-code
A verification code input, autocompletion friendly.
Examples
- Basic
- Custom Styles
Install
npm install --save react-input-verification-code
yarn add react-input-verification-code
Usage
import * as React from 'react';
import ReactInputVerificationCode from 'react-input-verification-code';
import 'react-input-verification-code/dist/index.css';
export default function App() {
return <ReactInputVerificationCode />;
}
API
Key | Type | Default | Required | Description |
---|---|---|---|---|
length | number |
4 |
false | How many items will be rendered |
onChange | function |
true | Function called when the value changes | |
placeholder | string |
· |
false | String rendered in each item when no value has been typed |