In this coding challenge, you need to create an OTP input field.
- Input field should take exactly
- Only numbers should be allowed as valid input.
- Component should support
Shift + Tab,
Left Arrow Key, and
Right Arrow Keyfor navigation and operations.
- Component should support paste functionality if the input is correct (6 numbers).
- Submit button should only be activate when entered OTP length is equal to 6.
- Whenever an input is active then it should be highlighted.
- Input Active Color:
- Once you are done with the above mentioned requirements then you can extend the question to add a timer that starts on load with an expiry of 1 minutes. After expiry, all submissions should fail.
To know more about custom timer, checkout --