Skip to content

Latest commit

History

History
53 lines (38 loc) 路 1.55 KB

README.md

File metadata and controls

53 lines (38 loc) 路 1.55 KB

react-verification-code-input

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.

Live demo

Install

npm install --save @gaudiy/react-verification-code-input

Usage

import React, { Component } from 'react';

import ReactCodeInput from '@gaudiy/react-verification-code-input';

class Example extends Component {
  render() {
    return <ReactCodeInput />;
  }
}

PropTypes

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

License

MIT 漏 suweya