People Really Like This New Component

Sdílet
Vložit
  • čas přidán 26. 02. 2024
  • The react ecosystem is growing by the day, now this?? People are doing some seriously good work, woah.
    -- sources
    otp input: input-otp.rodz.dev/
    -- my links
    saas: www.animate-code.com/
    newletter: www.joshtriedcoding.com/
    discord: / discord
    github: github.com/joschan21
  • Věda a technologie

Komentáře • 67

  • @rodz
    @rodz Před 4 měsíci +164

    I'm the library author and I really like your video ⭐
    Thanks for the tutorial and the backend/2FA explanation!
    Btw, I'm dropping a new Vue.js version soon alongside React

    • @gabrieltaveira
      @gabrieltaveira Před 4 měsíci +14

      Suggestion: add support for react-native. I've built countless OTP inputs there, as they're very common on mobile, and it's always unpleasant.

    • @dMDzn
      @dMDzn Před 4 měsíci

      I have one question. How does this component perform in regards to accessibility? I've seen implementations that use multiple inputs which buggers up screen readers.

    • @Neil_09
      @Neil_09 Před 4 měsíci +1

      This library is better if it would be for react native

    • @rodz
      @rodz Před 4 měsíci +2

      @@dMDzn In terms of accessibility, `input-otp` only renders a single HTML input natively. That's why screen readers are able to announce what its content, unlike most libraries/implementations where developers create 6 inputs for 1 digit each.

    • @rodz
      @rodz Před 4 měsíci +6

      @@gabrieltaveira It would be awesome to get some help on RN implementation!

  • @daggalando
    @daggalando Před 4 měsíci +1

    OMG I’ve been looking for this for a long time, thank you so much!

  • @arthur_snow
    @arthur_snow Před 4 měsíci +5

    Rodz did such a cool job with this component, I saw the development happen in the live-coding he does on Twitch

  • @robertm4934
    @robertm4934 Před 4 měsíci +16

    I love these library/component review videos - a handful of them including ShadCN and Aceturnity I am now using in all of my projects. I'm working on a project using essentially all ShadCN components and I'll tell you what - it's made the development experience 10x nicer. All component libraries need to be as standalone as Shad is.. there are tons of other UI libraries that I want to steal one or two components from, but often times they require you to wrap a provider and modify your tailwind config or global css styles which interferes with other libraries you may be using and just isn't as user friendly. Regardless keep up the good work Josh, I appreciate it!

    • @outis99
      @outis99 Před 4 měsíci

      Exactly this! It's the reason I've stayed with Mantine on some projects where I need some really specific components
      Still love Mantine tho

    • @codeaperture
      @codeaperture Před 3 měsíci

      what dashboard template do you use? For Shadcn or whatever Tailwind ecosystem?

  • @higormonteiro8314
    @higormonteiro8314 Před 2 měsíci

    thanks Josh, this is a good video!!

  • @khaledsanny4817
    @khaledsanny4817 Před 4 měsíci +4

    Well, since I saw a package on npm to make additions... I knew I could not be surprised anymore 😂

  • @Alienovore
    @Alienovore Před 4 měsíci +1

    It can be also really useful for Credit card input or IBAN etc

  • @Renzo-of3yn
    @Renzo-of3yn Před 4 měsíci

    Cool video Josh! It would be nice if you make a video refers to the best practices in the authentication process using the most common technologies like next and auth v5 🎉

  • @myjak_42
    @myjak_42 Před 4 měsíci

    can you make a video where you show how to add and use this in the digitalhippo projext?

  • @irfansaeedkhan7242
    @irfansaeedkhan7242 Před 4 měsíci +1

    wow this is is really helpful

  • @nazarshvets7501
    @nazarshvets7501 Před 4 měsíci +1

    The real questions is:
    - Can i prefill inputs say with value from query?
    - Does it have propper auto-complete attributes to automaticly enter from navigator.credentials (autocomplete="one-time-code")
    - Does it handle copy+paste cases?
    If it would, that would be real deal, and I would probably switch to this solution, as current of mine give me headache figuring out this cases

    • @rodz
      @rodz Před 4 měsíci +2

      1. What do you mean "prefill inputs from query"? It's a native HTML input under the hood. Just its content and selections that are transparent.
      2. Yes, autocomplete='one-time-code' is the default prop/setup as it is a native HTML input
      3. Handles all cases of copying-cutting-pasting

  • @brunopanizzi
    @brunopanizzi Před 4 měsíci +1

    What about ? It's better to just add another dependency?

  • @versaleyoutubevanced8647
    @versaleyoutubevanced8647 Před 4 měsíci +6

    shoutout guilherme rodz 🇧🇷

  • @developerpranav
    @developerpranav Před 4 měsíci +1

    I thought it's a waste of time to watch a video on an OTP input component, but man this deserves a spot in shadcn UI!

  • @codewithguillaume
    @codewithguillaume Před 3 měsíci

    YESSSS

  • @JohnFarrellDev
    @JohnFarrellDev Před 4 měsíci +60

    Isn't this incredibly easy to do without an external library.

    • @SaroVerhees
      @SaroVerhees Před 4 měsíci +44

      I build one from scratch and it took me 2 full days to get all the little details right, think about focussing the inputs and triggering the keyboard on mobile without weird animations for example. Probably end up with the same bundle size anyways, so yeah, it's definitely nice to use a little component that already handles all the details for you.

    • @rubendacostaesilva8442
      @rubendacostaesilva8442 Před 4 měsíci +14

      I wouldn't say incredibly easy, but it's doable.

    • @justin9494
      @justin9494 Před 4 měsíci +4

      oh hell na

    • @Renzo-of3yn
      @Renzo-of3yn Před 4 měsíci +27

      Bro, with all due respect, does anyone care if you create all your components from scratch? At the end of the day, your clients just want a beautiful and robust solution in less time. This component is very useful.

    • @rodz
      @rodz Před 4 měsíci +29

      I wrote this library after I realized I had spent 1-2 hours building a custom OTP input matching the design for a client of mine.
      The developer community deserved an easy way to build this, say in less than 2 minutes.
      Before implementing the lib, I checked what was Stripe's resolution to this kind of OTP input, but I don't think that's right as they render a single input with maximum of 1 digit and move the input around with CSS. That makes it inaccessible for screen readers since the input should have 6 digits maxlength instead.
      I found only one "good" way for rendering accessible inputs, which is rendering a transparent input on top of a custom CSS layout. That's the library's secret.

  • @tymurkr
    @tymurkr Před 3 měsíci

    this is a very easy, convenient, fast, and old way to confirm an account, and use a library for this...

  • @zvrk
    @zvrk Před 4 měsíci

    Twitch has this for their website

  • @sahebbeshra7659
    @sahebbeshra7659 Před 4 měsíci +3

    when is going to be added in shadcn

  • @yourboyman7410
    @yourboyman7410 Před 3 měsíci

    what is your opinion on django?

  • @kale_bhai
    @kale_bhai Před 4 měsíci

    This is what i ask in an interview

  • @rootbindev
    @rootbindev Před 4 měsíci

    nice

  • @buddy.abc123
    @buddy.abc123 Před 4 měsíci

    I've just built this last week

  • @Di-yes
    @Di-yes Před 4 měsíci +1

    Looks like there is really nothing to do that you cannot do by yourself. But OK, why not

  • @matthewrossee
    @matthewrossee Před 4 měsíci

    what is the difference between sending an email with verification code and an email with verification link? is it because emails with links are somehow more prone to be detected as spam?

  • @Avi67673
    @Avi67673 Před 3 měsíci

    Bro can you please make an tutorial on how to create a AI photography tool to generate professional headshots of ourselves. Please.
    If anyone here can create a ai tool like this for me please share the budget.

  • @fifty-plus
    @fifty-plus Před 4 měsíci

    Let's hope this is just a step to biometric and passwordless authn - the sooner the better. I'm sure people will butcher the backend implementation though, unfortunately.

  • @DomskiPlays
    @DomskiPlays Před 4 měsíci

    But does it work without javascript tho

    • @rodz
      @rodz Před 4 měsíci +1

      nope

  • @filipkovac767
    @filipkovac767 Před 4 měsíci +1

    you didn't explain what added functionality the lib provides...

    • @rodz
      @rodz Před 4 měsíci

      I guess the ONLY advantage of this over any other OTP input library is being able to implement WHATEVER design you want while still being accessible as it is a native HTML input under the hood

  • @malekgara-hellal1777
    @malekgara-hellal1777 Před 4 měsíci +2

    I know this component before u do

  • @myrdddin
    @myrdddin Před 4 měsíci

    that was i was looking for

  • @AbhiShake-pl3cf
    @AbhiShake-pl3cf Před 4 měsíci +2

    Yeah add 69420 packages for every single thing you can do in a minute

    • @GarlikBaguette
      @GarlikBaguette Před 4 měsíci +1

      In the end it's all compiled and minified anyway. These libraries are optimized and weigh nothing. You can't do something like this in a minute.

    • @AbhiShake-pl3cf
      @AbhiShake-pl3cf Před 4 měsíci +1

      I kinda agree. But what if they get discontinued?
      The point is, ui library is better when we can just copy paste it

    • @rodz
      @rodz Před 4 měsíci

      @ake-pl3cf it's not a UI library. It's a primitive, just like Radix UI unstyled components. What shadcn/ui does as a UI library is to provide styled components AND also install those underlying radix packages whenever needed.

    • @AbhiShake-pl3cf
      @AbhiShake-pl3cf Před 4 měsíci

      @@rodz then it makes more sense but for a primitive, i dont like the use of render function

  • @b5fw6jg7
    @b5fw6jg7 Před 4 měsíci +1

    I personally hate these OTP inputs as a user.
    1. Most of them don't let me paste the OTP.
    2. The oncomplete is stupid as it will trigger the submission and then I have to wait for it to tell me the OTP is wrong which I could submit properly by my self.
    Normal inputs for OTPs are the best in terms of UX and DX both.

    • @rodz
      @rodz Před 4 měsíci +1

      1. This OTP input allows pasting code and also autocompletes from messaging apps automatically as it renders a native HTML input under the hood with "autocomplete='one-time-code'" attribute
      2. the `onComplete` callback is optional.

  • @davialcantara__
    @davialcantara__ Před 4 měsíci

    🇧🇷🇧🇷🇧🇷

  • @aleksander5298
    @aleksander5298 Před 4 měsíci +1

    Seems like another is-odd package that is useless, because implementation of this solution is very easy :) maybe it's good for some interns that don't know how to focus next input or trigger submit handler lol