Reusable Modals with Radix UI

Поділитися
Вставка
  • Опубліковано 12 вер 2024

КОМЕНТАРІ • 32

  • @igrb
    @igrb Рік тому +14

    I love how when building abstractions like this with radix, if you replace "Modal" there with "Popover" it should just work™ given you expose the same API. Absolutelly love it!

  • @jackfairfield1109
    @jackfairfield1109 Рік тому +1

    How you only have 23.5k subs is beyond me. This is fantastic. Thanks!

  • @Luxster89
    @Luxster89 Рік тому +1

    Every time I watch one of your videos, I feel like I'm learning something new. Outstanding explanation and great presentation.

  • @DEV_XO
    @DEV_XO Рік тому +1

    Amazing mate! More Radix / Framer Motion tutorials please! We need them!

  • @rjtdas
    @rjtdas Рік тому +3

    Damn! I was hardcoding all this just because of the button trigger, thanks for this helpful tutorial.
    Also, could you please create a video on shared element transition between two pages?
    One way i know is using layoutId from framer motion but i couldn't customize it
    Assume page 1 has 1 image on left side and 2 page has the same image but on the right side
    When navigated to page 2 from page one the image should slide to left
    Please create this video, there's no video on UA-cam about it, especially with NextJs 13.
    Again thanks this was a super cool video 👏 ❤

  • @robertgregg7028
    @robertgregg7028 Рік тому

    1st video I have seen of yours. Such a great flow. Lighting. Camera angles. Effortless editing between showing the code/output/yourself.

  • @SeanCassiere
    @SeanCassiere Рік тому +1

    Radix is just awesome! Been using it with shadcn/ui and its extensibility and customization is just awesome!

  • @meowmesh
    @meowmesh Рік тому

    Damn i love this kind of series. Keep it comming. In last project i was kinda hating my modal because i made from scratch.

  • @alexanderkuznetsov634
    @alexanderkuznetsov634 Рік тому +1

    Great, it looks like you almost have a content playlist - "Practical Next.js, Radix UI, Tailwind, Animation", or it's a future course on Buid UI =)). Thanks for sharing all that knowledge.

  • @tshddx
    @tshddx Рік тому +2

    That’s the level of quality of neckline trim that I aspire to but rarely achieve. Are you using a DE or a straight razor?

    • @samselikoff
      @samselikoff  Рік тому +3

      😄 ty! Yep I use a safety razor, always found them to be the best

  • @converter
    @converter Рік тому

    The thought process and simplicity of explanation is superb! Thanks for this wonderful effort to share

  • @khairulhaaziq2332
    @khairulhaaziq2332 Рік тому

    definitely need more radix contents sam!

  • @rashzh5502
    @rashzh5502 Рік тому +1

    Fantastic content!
    Would it be possible for you to create a tutorial covering the intricacies of designing components and the architecture of React applications?

  • @nick-ui
    @nick-ui Рік тому

    The way to make exports like Modal.Button = Dialog.Trigger is really beautiful for eyes, no more a bucnh of imports from radix library mixed with own components.
    Btw I also saw this trick in shadcn ui library.

  • @Balance-8
    @Balance-8 Рік тому

    Incredible!

  • @rariber
    @rariber Рік тому

    as always very helpful thx.

  • @user-mt5uy9lf1c
    @user-mt5uy9lf1c 10 місяців тому

    Hi Sam, I stumbled upon your content looking for RSC and found a whole bunch of awesome videos and content you have created so far. Your way of teaching is just absolutely amazing. Appreciate all your time and effort for bringing such a quality content. One question I had what vscode theme and font you are using.. Its really soothing to eyes and very readable distraction free.. Thank you

    • @samselikoff
      @samselikoff  8 місяців тому

      Thanks for the kind words! I use Dracula draculatheme.com

  • @osman3404
    @osman3404 Рік тому

    I wish we had content creators like Sam for Blazor ;)

    • @gnrsn9714
      @gnrsn9714 Рік тому +1

      Why would you ever choose to use Blazor?

  • @mhddngs
    @mhddngs Рік тому

    I see a new Sam video
    I click

  • @alisic
    @alisic Рік тому

    Great video as always! One question: do we need to forward the ref to the root of our new component in thia case?

    • @samselikoff
      @samselikoff  Рік тому

      Yes you would to be fully compatible, but I usually wait until I see an error to add it as you often don't need it depending on what functionality you expose.

  • @trekkergal460
    @trekkergal460 7 місяців тому

    Not sure why the modal does not close for me tried everything

  • @Leralow
    @Leralow 11 місяців тому

    I'm having a problem scrolling my modal with mobile devices when the virtual keyboard appears. The problem is that the keyboard appears above the form and the scroll remains blocked. the scroll is only working if the size of my form in the center is initially larger than the screen size.

  • @edgarasben
    @edgarasben Рік тому

    But... Aren't we back to client side if the whole page is marked as "use client"? The component doesn't seem to work in RSC.

    • @samselikoff
      @samselikoff  Рік тому +1

      The component itself would need to be a client component, you could add it at the top of modal.tsx. That way the page/layout itself could still be a RSC.

  • @j0hannes5
    @j0hannes5 Рік тому

    where can I learn more about this Component.Subcomponent = ... pattern?

    • @samselikoff
      @samselikoff  Рік тому +4

      It's really just property assignment, Component is a function but functions in JavaScript are also objects. So you can attach properties to them!

  • @jimshtepa5423
    @jimshtepa5423 11 місяців тому

    what hapenned at 7:08?

    • @samselikoff
      @samselikoff  11 місяців тому

      No edits - I just turned off word wrapping (⌥ + Z) so the code took up fewer vertical lines!