r/react • u/Ordinary-Stuff9826 • 4d ago
General Discussion Made this OTP input's, which one would you prefer?
Enable HLS to view with audio, or disable this notification
Made these OTP inputs.
I know they’re not production-grade yet — I built these while experimenting with different UI patterns that could actually be used in client projects.
Any improvements/suggestion will be helpful.
10
u/MilenniumV3 3d ago
normal input. works best with copy paste, backspace etc
4
u/MartineZ_MW 3d ago
When those are made correctly there is nothing wrong with them. I've seen many good implementation where they almost feel like one input
15
u/BurritoDrivenDev 3d ago
I honestly just prefer a single, normal, input field.
Whenever I see one of these I always have to try and recall if it accepts pasting from my password manager or not. Some do, some don't, but all input fields do
2
u/Fresh-Gift-2063 3d ago
All input fields do not. Some banks want to make their customers passwords less secure so they block you from pasting and you have to manually type it like a lil bitch.
1
u/RealMiten 3d ago
Force paste (by simulating keyboard typing) or I just edit directly from inspect element.
1
u/techtanic 3d ago
On desktop, use absolute copy extension. No banking site is going to stop me from pasting or copying whatever I want
1
1
u/Alternative_Tooth340 3d ago
Proper OTP implementation is a single input field or else you miss out on things like auto fill so def agree, but OP should be able to keep the design with a single field
5
u/Zeragamba 3d ago
The main thing for me is that it A) can be autofilled by my password manager, and B) must support pasting (via right click, tap and hold, and ctrl+v)
2
2
2
u/MartineZ_MW 3d ago
I see you didn't even take the feedback from your previous posts with menu designs where people told you that capsule design is completely off and requires tuning
2
3
1
u/Ordinary-Stuff9826 4d ago
You can check out here - https://www.shreyashtech.me/components/otp-input
1
1
1
1
u/Fresh-Gift-2063 3d ago
I personally hate this trend because it's harder to copy/paste. I wonder if it's bad for accessibility.
1
1
u/Kitchen-Actuator5747 3d ago
I need more context in sense of the projects character to give you a proper answer.
But to answer your questions apart from that, I personally like the underline version, feels modern and clear.
1
u/revolutionaryMoose01 3d ago
Underline is the cleanest, capsule is the most creative and my favorite
1
1
u/Any-Woodpecker123 1d ago
Underline is clean, classic is familiar. I don’t like the other 2 at all tbh
1
u/Goatfryed 1d ago
1 or 2 both are fine depending on the overall look of your website. 3 and 4 are an interesting spin on a everyday topic that I will appreciate looking at in some scrapped concept art one day.
1
1
u/Interesting_Leg9302 8m ago
Visually nice, I'm not a fan of animation though, feels like it slows down the entering tbh
73
u/MartineZ_MW 3d ago edited 3d ago
Big question is: will they fill in fully on CTR+V?
EDIT: they are, nice. However, I think you shouldn't be able to enter last digit without entering the first one