react-confirmation-code-input

Confirmation code component for React

Usage no npm install needed!

<script type="module">
  import reactConfirmationCodeInput from 'https://cdn.skypack.dev/react-confirmation-code-input';
</script>

README

🔐 react-confirmation-code-input

One input for every code

react-confirmation-code-input is released under the MIT license. CircleCI build status. NPM package version.

📦 How to use?

  1. Install package using your favourite tool.
yarn i react-confirmation-code-input
npm i react-confirmation-code-input --save
  1. Import ConfirmationCodeInput from this package
import { ConfirmationCodeInput } from 'react-confirmation-code-input';

🔧 Props

Property Type Description
fields number The number of chars in the code.
value string Sets the value of the input.
onChange func Called when user changes value of the input.
className string Sets CSS class of root element.
disabled bool Makes all children disabled.
regex string Makes sure all chars typed are creating matching string

📝 License

Licensed under the MIT License.