Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

react-verification-code-input

suweya57.3kMIT1.2.9TypeScript support: included

🎉A verification code input

react, react-component, code, input, verify, verifycode, PIN, pin-code

readme

react-verification-code-input

🎉A verification code input

NPM JavaScript Style Guide

NPM

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

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
title string code input title
loading bool show loading flag
className string class name
values array default values
placeholder array input placeholder

License

MIT © suweya

changelog

1.2.3 (2020-01-14)

Bug Fixes
  • input pattern miss * (ab6303cf)
  • number input plus or minus sign (57317459)

1.2.1 (2019-08-10)

Bug Fixes
  • 12 (af780868)

1.2.0 (2019-05-09)

New Features
  • add default values (0bf90f13)

1.1.2 (2019-04-16)

Build System / Dependencies
  • copy file plugin (1454e1c9)
New Features
  • add typescript define (05cee6ea)
Bug Fixes
  • ios safari style (fe4155c1)

1.1.1 (2018-12-19)

Bug Fixes
  • type(props) PropTypes define error (1e3d7cf4)
Other Changes
  • update (5dd0c48e)

1.1.0 (2018-12-12)

New Features
  • support text input (1bd276f6)
  • support clear method (clearvalues) (2a5b8035)

1.0.5 (2018-11-30)

New Features
  • support paste code (fa4e577f)
Bug Fixes
  • Keep pressing the keyboard cursor jump error (62071847)

1.0.4 (2018-11-30)

Documentation Changes
  • update badge (1c1c0711)
New Features
  • add className props (0ad80c48)

1.0.3 (2018-11-29)

Documentation Changes
  • update example (f4bc32b1)
  • add live demo link (0e7d399e)
Bug Fixes
  • on backspace trigger onChange params (7664d7ad)

1.0.2 (2018-11-28)

New Features
  • change package name (52d18401)
  • change package name (41643a33)

1.0.1 (2018-11-28)