Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-verification-code-virtual-keyboard

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-verification-code-virtual-keyboard

Based on antd-mobile Modal, InputItem. Use css border-image instead of border. Developed a four-digit verification code input box with virtual keyboard and pasting functions.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-verification-code-virtual-keyboard

NPM version Build Status Coverage Status code style: prettier

Based on antd-mobile Modal, InputItem. Use css border-image instead of border. Developed a four-digit verification code input box with virtual keyboard and pasting functions.

Install

yarn

yarn add react-verification-code-virtual-keyboard

npm

npm install --save react-verification-code-virtual-keyboard

UMD

<script src="https://unpkg.com/react-verification-code-virtual-keyboard@1.0.0/dist/react-verification-code-virtual-keyboard.umd.js"></script>

Tips: You can find the library on window.ReactVerificationCodeVirtualKeyboard.

Import

ES2015

import ReactVerificationCodeVirtualKeyboard from 'react-verification-code-virtual-keyboard'

CommonJS

const ReactVerificationCodeVirtualKeyboard = require('react-verification-code-virtual-keyboard')

Usage

import ReactVerificationCodeVirtualKeyboard from 'react-verification-code-virtual-keyboard'

function Example() {
  return (
    <ReactVerificationCodeVirtualKeyboard
      visible={true}
      onClose={() => {}}
      maskClosable={true}
      headerLeftContent={[<b key="X">X</b>]}
      headerTitle="验证码标题"
      headerRightContent={[]}
      tipMessage="验证码提示信息"
      onInputChange={() => {}}
      isCodeImmediatelySendVerify={true}
      onSendVerifyCode={() => {}}
    >
      {/** List only children or Null */}
    </ReactVerificationCodeVirtualKeyboard>
  )
}

Params

PropertyDescriptionTypeDefaultisRequired
visibleShow Modal Verification Code UIbooleanfalsetrue
onCloseClose Modal Verification Code UI (Default clear countdown)functionundefinedtrue
maskClosableWhether the mask layer of modal is clickablebooleantruefalse
headerLeftContentLeft half of headJSX.Element[][]false
headerTitletitleJSX.Element | string
'请输入验证码'false
headerRightContentRight half of headJSX.Element[][]false
tipMessageTipsJSX.Element | string'验证码'false
onInputChangeInput Box handle change valuefunctionundefinedfalse
isCodeImmediatelySendVerifyWhether to send the verification code immediately when the modal pops upbooleanfalsefalse
onSendVerifyCodeIf the isCodeImmediatelySendVerify value is true, auto excute onSendVerifyCode. 点击获取验证码,将执行此函数。functionundefinedtrue

LICENSE

GPL v3 License

Keywords

FAQs

Package last updated on 04 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc