1.0.5 • Published 3 years ago

pin-input-react v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

pin-input-react

This package is in a very early stage, so any help can be usefull.

NPM JavaScript Style Guide

The pin-input-react is a react component to be used when you want a pin component. This component is being develop to be very generic to attend many user cases as possible.

Live demonstration

Install

npm install --save pin-input-react

yarn add pin-input-react

Usage

A example of usage can be found here.

the component accepts 3 other component:

  • pinComponent - required and is used as each pin value
  • pinComponentOnFocus - is used when the pin position is focused
  • pinComponentOnFill - is used when the pin position has a value

If you set showValues, make sure the pinComponentOnFocus get his chield, because it will be used to insert the pinText. The same to pinText, which is used to show the pin values. Any questions, here show a implementation.

Properties

nametypedescriptionis required
lengthnumberlength of the inputyes
directionrow or columnthe direction of the pinsyes
pinComponentReact.FCA component for default pinyes
pinComponentOnFocusReact.FCA component for when the pin is focusedno
pinComponentOnFillReact.FCA component for when the pin is filledno
onChangePinCallbackUsed for onChange from inputno
ShowValuesbooleanIf want to show the values when filledno
pinTextReact.FCUsed to show values inside the pinComponentOnFillno

License

MIT © droderuan

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago