A verification code input
fork from suweya/react-verification-code-input
- Styles for each element are deleted.
- You cant style as you like with className & fieldClassName.
- No Title or Loading.
npm install --save @gaudiy/react-verification-code-input
import React, { Component } from 'react';
import ReactCodeInput from '@gaudiy/react-verification-code-input';
class Example extends Component {
render() {
return <ReactCodeInput />;
}
}
Key | Type | Desc |
---|---|---|
type | text | one of number or text |
fields | number | The count of characters |
onChange | func | Trigger on character change |
onComplete | func | Trigger on all character inputs |
fieldWidth | number | input width |
fieldHeight | number | input height |
autoFocus | bool | auto focus first input on init |
className | string | class name |
fieldClassName | string | class name for each field |
values | array | default values |
placeholder | array | input placeholder |
MIT © suweya