react-vcode-input

1.0.3 • Public • Published

React Code Input

An input component for inputting verification codes for react

license npm version npm issues npm forks npm stars

To use

$ npm i --save react-vcode-input

Usage

import VcodeInput from 'react-vcode-input';
 
<CodeInput
 fields={6}
 autoFocus
 onFinished={onValueChange}
 inputStyle={{
  marginTop: 0,
    backgroundColor: "transparent",
    marginLeft: "4px"
 }}
/>

Props

Property Type Description
fields number Code length
autoFocus bool Input gets focus automatically
onFinished (value: string) => void Callback function at the end of all input
inputStyle object Style of item

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i react-vcode-input

Weekly Downloads

10

Version

1.0.3

License

ISC

Unpacked Size

31.4 kB

Total Files

13

Last publish

Collaborators

  • sunlei19951007