/Otp-inputfield

OTP Page With Autofocus Input Fields and copy Paste functionality

Primary LanguageJavaScript

OTP Page With Autofocus Input Fields and copy Paste functionality

  • User is able to type in the first input box and it should move the user to the next input box
  • And the same is happen with deletion
  • The component is accepting length as props
  • User can paste, but not more than 5 digit number which must be equally divided into 5 input fields.
  • On pasting from the clipboard, focus should be kept in the last input field, or the appropriate input box if the total digits are less than 5