1.2.11 • Published 2 years ago

react-verification-code-input-2 v1.2.11

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-verification-code-input

🎉A verification code input

NPM JavaScript Style Guide

NPM

This package is a fork https://github.com/suweya/react-verification-code-input I made a new package, because the author of the old one has probably stopped updating it and didn't accept my pull request, and I needed to add some features

Live demo

Install

npm install --save react-verification-code-input

Usage

import React, { Component } from 'react';

import ReactCodeInput from 'react-verification-code-input';

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

PropTypes

KeyTypeDesc
typetextone of number or text
fieldsnumberThe count of characters
onChangefuncTrigger on character change
onCompletefuncTrigger on all character inputs
fieldWidthnumberinput width
fieldHeightnumberinput height
autoFocusboolauto focus first input on init
titlestringcode input title
loadingboolshow loading flag
classNamestringclass name
valuesarraydefault values
placeholderarrayinput placeholder

License

MIT © suweya