🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-input-verification-code

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-input-verification-code

A verification code input, autocompletion friendly

1.0.2
latest
Source
npm
Version published
Weekly downloads
6.5K
-10.8%
Maintainers
1
Weekly downloads
 
Created
Source

react-input-verification-code

A verification code input, autocompletion friendly

NPM JavaScript Style Guide

Features

  • Support native autocompletion when receiving a code via SMS
  • Support pasted string (when number)

Examples

Install

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

Usage

import * as React from 'react';
import ReactInputVerificationCode from 'react-input-verification-code';

export default function App() {
  return <ReactInputVerificationCode />;
}

API

Props

KeyTypeDefaultRequiredDescription
autoFocusbooleanfalsefalseFocus on render
lengthnumber4falseHow many items will be rendered
onChangefunction() => {}falseFunction called when the value changes
onCompletedfunction() => {}falseFunction called when the code is completed
placeholderstring·falseString rendered in each item when no value has been typed
valuestring() => {}falseControl internal input value
typetext or passwordtextfalseDisplay the item value or a password mask
passwordMaskstringfalsePassword mask

CSS Properties

The following CSS properties are set globally so you can easily override them to fit your needs

KeyDefaultDescription
--ReactInputVerificationCode-itemWidth4.5remWidth of an item
--ReactInputVerificationCode-itemHeight5remHeight of an item
--ReactInputVerificationCode-itemSpacing1remSpace between two items

License

MIT © ugogo

Keywords

react

FAQs

Package last updated on 12 Jul 2022

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