PinInput component is similar to the Input component,
but it is optimized for entering sequences of digits.
The most common application is for entering OTP or security codes.
Each input collects one number at a time. When a number is entered, focus is moved automatically to the next input, until all fields are filled.
There are three sizes of an Input:
You can set the defaultValue of the PinInput if you wish:
Or even a partial defaultValue:
If you donʼt like the default placeholder (
○), you can change that too.
PinInput moves focus automatically to the next input once a field
is filled. It also transfers focus to a previous input when Delete is
pressed with focus on an empty input.
To disable this behavior, set
Try copying & pasting
1234 into any of the inputs in the example above.
By default, you can only change one input at a time, but if one of the input
field receives a longer string by pasting into it,
PinInput attempts to
validate the string and fill the other inputs.
Input so you can pass all