Styling a Radix Dialog with Tailwind CSS

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

КОМЕНТАРІ • 78

  • @EnesKab
    @EnesKab 8 місяців тому +2

    This is my first time here, and just exploring radix. These tutorials are rare find. So right into the point, super clear and easy to follow in a very right pace. Thank you Sam.

  • @jimshtepa5423
    @jimshtepa5423 Рік тому +19

    Thank you for this quick overview. I hope your partnership with workos lasts long enough to covere 80-90% of the primitives😁

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

    Really looking forward to part 3 😁

  • @rapid-ruby
    @rapid-ruby Рік тому +8

    Wow, Radix looks like an awesome library, really cool that it doesn't inject any styles as well! Thanks for sharing!

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

    great Radix content! Thank you so much for producing such high quality content for free!

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

    wow, I've messed just a tiny bit with radix-ui but you're helping really drive the value/purpose of it
    I admire your UI skills, it's my kryptonite atm, but you make it looks so easy! The step by step approach makes it look more manageable. Thanks for the share!

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

      hmm, I think it's the combination with tailwind.css which is a real winning combination, bc then you can very, very easily modify the CSS and see immediate changes, versus I'm used to manually typing the CSS in the style, inline as a json obj. Albeit your experience with the specific radix components makes it look easy. I'm looking forward to trying this new approach sometime though to test my theory

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

    Excellent work! Tutorial pace is right on the money and design is simple but elegant.

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

    Such a great overview about Radix and their dialog component! Instant sub!

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

    Another great video! You are killing it! Thanks!

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

    What a fantastic video, Sam. I kept hoping you would touch on the dialog title part which is not always obvious as it has a11y utility. Thank you! 🙌

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

    You really are the best. Thank you for another excellent video.

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

    Hey Sam! Need that surround with snippet/shortcut 😬 0:55

  • @subeg
    @subeg Рік тому +13

    You are VS Code shortcut wizard. Can you do a video on VS Code shortcuts and snippets?

    • @nayana622
      @nayana622 4 місяці тому

      ua-cam.com/video/qIHR2wmxy3U/v-deo.html

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

    excellent really, i see how well you prepared entire presentation

  • @angstrom1058
    @angstrom1058 5 місяців тому

    10 lines of code, but you have to know what 10 lines. It always pays to know what you are doing. Thanks for this!

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

    Man that's sooooo clean.

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

    Fantastic video, keep it up!!

  • @alejandrobanderas3577
    @alejandrobanderas3577 6 місяців тому

    Thank you! You are making some really good content!

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

    Tempting to replay this several times

  • @coder-twadd
    @coder-twadd Рік тому

    This is fire btw. Thanks for this video!

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

    Always providing high quality and informative videos. Keep up the great work

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

    This is awesome. I can even create my own Design System

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

    This is so practical and useful, thank you for the tutorial 🙏

  •  Рік тому

    Such a professional video. Subscribed immediately.

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

    these types of videos are very helpful! thx

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

    high quality vid as always,thx.

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

    Cool. Thanks.

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

    Thanks for this video. Make a fun video about shadcn/ui, it uses Radix too.

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

    Great content!

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

    Always a joy

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

    Thanks for the video 🤟

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

    Great video as always. calm and clean

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

    So nice and easy. Awesome video.

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

    A real thank you, i've learned a lot in only 10 minutes

  • @coder-twadd
    @coder-twadd Рік тому

    I would pay money to have videos on using each of the radix components

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

    Amazing, love your videos, one of my favorite channel! 😃

  • @AlexanderBogdanov-dw6cw
    @AlexanderBogdanov-dw6cw 7 місяців тому

    Огромное спасибо. Круто

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

    Great content as always!

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

    Really cool! Would be great to see on how to refactor this into a more reusable component

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

    i loved it

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

    Good content....

  • @AlexanderBogdanov-dw6cw
    @AlexanderBogdanov-dw6cw 7 місяців тому

    огромное спасибо Вам!

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

    Really missing out these cool things in Vue land.

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

    I've never used react portals so i'm wondering, for dialogs, is there any benefits of using it over a element ?

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

    Thats so cool thank you for sharing valuable informations can I ask favour please can we have more videos with next js 13.4 make a app with server side actions etc

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

    what is the shortcut to wrap the html tag

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

    Hey Sam, awesome tutorial as always! One question tho: would you recommend using this Dialog approach in creating Hamburger menu navigation for mobile phones. I want the same dialog functionality, but i am concerned about a11y aspect (role="dialog" for example etc.) What would be your approach, or what primitive would you use in that case?

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

    Hi Sam, great content.
    Do you have any courses for RadixUI + TailwindCSS?

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

    niceee

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

    Given the cool new features like intercept and parallel routes of Next 13, wouldn't you use those to create the interactions for a dialog instead of Radix?

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

    Cool! Two questions:
    How would you abstract this in the best way? The close button and the title will probably always be rendered. And how would you animate these? Render them static and let framer motion do the job with controlled state?

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

      Both questions will be answered in the series!
      tl;dr you can use Framer Motion but I'll be showing off CSS animations (Ep. 2). In Ep. 3 we'll cover reusability 👍

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

      @@samselikoff Just came here to ask the same two questions! Can't wait for part 2 and 3!

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

    Great job Sam ... tks a lot ... just one question, would this work without use client directive ?

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

      In a non-Next.js app yes, in a Next.js app I would turn the button into a client component that also handles the modal (because the modal is a client-side interactive feature). I think I will make a video on this refactoring once I wrap this series!

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

    Question: Shouldn't the Dialog.Root be written outside the users.map() function, for performance reasons? Source: My intuition haha

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

    Great video, really nice DX. I wonder the cost of having a dialog for each item instead a global one. Is it optimized by radix/react portal ?

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

    why need to use max-w-md and w-full together? what effect does it offer?

  • @MikeRost-ly7pn
    @MikeRost-ly7pn Рік тому

    Honestly feels like a lot of custom work styling and setting things up to just get a normal modal. Is the there no "out-of-the-box" solution?

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

    Is it fine that the Dialog is rendered many times for every item in array?

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

      Yes! The actual dialog contents (in the portal) is only rendered once for the selected card. Being able to render each Trigger component locally directly inside the loop is actually one of the benefits of the way Radix component are structured 👍

  •  Рік тому

    its normal to every line has your dialog? or create a dialog that everyline calls to use ?

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

    What is the difference between tailwind-css and just writing inline-css?

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

    What vscode theme do you use?

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

    Is it not a bad practise to have a Dialog instance for each user object instead of just one Dialog for any user object?

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

      Not bad at all, because the Dialog.Content is rendered in a React Portal, and has no output whenever the dialog is closed. So there's only ever one dialog rendered when a card is selected.
      Being able to render each Trigger component locally directly inside the loop is actually one of the benefits of Radix's API 👍

  • @kH-ul4hk
    @kH-ul4hk Рік тому

    the can't scroll feature of the Radix Dialog is nice, but on operating systems like windows it makes the scrollbar in the browser disappear, and thus causing layout shift. Is there an easy fix for this problem?

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

      Add overflow-y-scroll to force the scrollbar to always appear?

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

      I think in the past libraries like Bootstrap would handle that by applying some padding to body when a modal is open. Let's say scrollbar is 10px wide, when a modal is open you would add a class to body and then add 10px padding when that class is present and that would prevent the content from jumping because same area would be taken in place of scrollbar.
      Not sure if they still do it that way, but I do remember it as an ok trick to handle that. Also, I'm looking at Radix UI Dialog documentation on Windows now and I don't see layout shifting when opening the Dialog. Maybe they handle that already for you?

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

    Is there a reason you prefer RadixUI over HeadlessUI?

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

    How's this better than headless-ui?

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

      Radix has several more components. Headless is great but just not quite as full featured. I reach for Radix these days 👍 Headless still well supported and a great choice though!

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

    Can the dialog be animated in and out?!

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

      It sure can, we're covering that in the next episode!

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

    I'll be honest, this is why Radix/Tailwind isn't for me. 3 wrappers and all of CSS in one line... I know we've switched the definition of "separation of concerns" from separating HTML-CSS-JS to just components (having their own HTML/CSS/JS all mixed up in this monstrosity), but this just gives me the foulest of code smells. I'll wait till we come up with something better. Great video though!