react-code-verification-input
TypeScript icon, indicating that this package has built-in type declarations

1.0.10 • Public • Published

Storybook demo

Try it youself at Chromatic

Installation

npm i react-code-verification-input

Usage

Use it as a controlled component, by suplying it with value and onChange value callback.

import React, { useState } from 'react'
import { CodeInput } from 'react-code-verification-input'

const [code, setCode] = useState('')

<CodeInput
  length={6}
  onChange={(value) => {
    setCode(value)
  }}
  value={code}
/>

Component props

Name Type Optional Description
length number No Lenght of the input.
value Text No Value of input.
onChange Text No Callback running after value is changed.
cellClass Text Yes CSS class to override custom cell styling.
containerClass Text Yes CSS class to override custom container styling.

Readme

Keywords

none

Package Sidebar

Install

npm i react-code-verification-input

Weekly Downloads

49

Version

1.0.10

License

MIT

Unpacked Size

25.2 kB

Total Files

16

Last publish

Collaborators

  • fullmetal88