Dialog Is My Favorite HTML Element And It Is Amazing

Поделиться
HTML-код
  • Опубликовано: 5 янв 2025

Комментарии • 80

  • @curiouslycory
    @curiouslycory 11 месяцев назад +81

    Originally released in 2014, this has had full support on all major browsers since 2022. Great find!

    • @Wjuw-dq3rg
      @Wjuw-dq3rg 9 месяцев назад +2

      Emotional damage 😂

  • @wlockuz4467
    @wlockuz4467 11 месяцев назад +79

    Its nice to see Web finally catching up to native platforms.

  • @onlyonwed526
    @onlyonwed526 11 месяцев назад +37

    Thanks. These shorts are hell of useful keep up

  • @ElidaeDanh
    @ElidaeDanh 2 месяца назад

    This makes “agree to our terms of service” so much easier now

  • @square-deal2375
    @square-deal2375 11 месяцев назад +14

    Holy cow bro, I just was freaking out about this before your video popped up! Yeah dialog is really cool. Keep up the energy have a good day

  • @nathnolt
    @nathnolt 11 месяцев назад +7

    It's a pretty good element. Better than anything else. I just wish that the people that specced it, thought about the case of closing the dialog by clicking on the backdrop. Right now you need a bunch of extra elements, css and some JS to make this situation work in the correct way, where the backdrop only closes on a click, and not merely on (what essentially is just) a mouse up event.

  • @DEBO5
    @DEBO5 11 месяцев назад +4

    This is for very simple things you can’t really customize how the modal
    Opens or closes (I.e fade out and translate down)

    • @User948Z7Z-w7n
      @User948Z7Z-w7n 2 месяца назад

      Skill issue. You can customize everything

  • @cusematt23
    @cusematt23 11 месяцев назад +1

    Love the hair and the videos bro 🎉

  • @edwarddelgado9654
    @edwarddelgado9654 10 месяцев назад

    Cool, tyx dude. I didn't know about the dialog elements

  • @vs-cd6qq
    @vs-cd6qq 11 месяцев назад

    Shorts are very helpful thank you

  • @sangtran1410
    @sangtran1410 11 месяцев назад

    Amazing ! I just realized when watched your video. Thanks for sharing!

  • @kiranravi-k9p
    @kiranravi-k9p 11 месяцев назад +1

    Nice one dude 🎉❤

  • @sjyoshiys
    @sjyoshiys 11 месяцев назад +4

    Awesome! Thanks for sharing!

  • @sujitkumarsingh3200
    @sujitkumarsingh3200 11 месяцев назад

    I dread working on modals and forms.
    But this is interesting.

  • @manishrawat9045
    @manishrawat9045 10 месяцев назад

    Very helpful ❤

  • @user-il9qo4qc4n
    @user-il9qo4qc4n 11 месяцев назад +6

    Thanks for this. Aren't old fashioned custom models already accessible though? What's more accessible to users about doing it this way?

    • @bringbackwindowsphone
      @bringbackwindowsphone 11 месяцев назад +5

      Old modals need a bunch of aria tags etc to represent it. This is built into the browser so screen readers etc can just work with it.

    • @nathnolt
      @nathnolt 11 месяцев назад +2

      Some modals do work, yes. But loading in a ton of JS and / or CSS shouldn't be a necessary step. And with , it's no longer needed.

    • @user-il9qo4qc4n
      @user-il9qo4qc4n 11 месяцев назад

      @@nathnolt A browser loading JS/CSS to open a modal isn't really a problem is it? Even on the slowest connections the user wouldn't notice.

    • @nathnolt
      @nathnolt 11 месяцев назад

      @@user-il9qo4qc4n they definitely would notice. Run a lighthouse test to see the results, though. Its on the developer tools of Chrome based browsers. And it doesn't work on file:///

    • @nathnolt
      @nathnolt 8 месяцев назад

      @@user-il9qo4qc4n They would definitely notice. And making your own modal system is hard to make it accessible. If you're creating a new web app, you should use the new dialog system.

  • @felyppe6509
    @felyppe6509 11 месяцев назад

    The problem I had with it is that I couldn't make it close if a person clicks outside the dialog (in the backdrop)

  • @rafikhankhadem6657
    @rafikhankhadem6657 9 месяцев назад

    Finally, I don't have to install + use any popup/alert/modal libraries

  • @MEZOSA73
    @MEZOSA73 11 месяцев назад

    Work in all brawsers ?

  • @ELMlKO
    @ELMlKO 11 месяцев назад +1

    can you add transitions when showing the dialog and closing it?

    • @rickodex176
      @rickodex176 11 месяцев назад

      You can, but it doesn’t work very well in safari or firefox, only in chrome. I tried few days ago, and decided not to use it for this exact reason.

    • @nathnolt
      @nathnolt 11 месяцев назад

      You definitely can, but you need to add elements yourself, and handle the animations yourself.

  • @ran_css
    @ran_css 9 месяцев назад

    I love u❤❤❤❤ your help. Me more in ts with react really thank u

  • @GHost-lh8mb
    @GHost-lh8mb 7 месяцев назад

    What name of this app

  • @programmerjowo
    @programmerjowo 11 месяцев назад

    why they did not create grid element?

  • @innerresonance6682
    @innerresonance6682 11 месяцев назад

    Sorry, new & learning - what is use case for this?

  • @andreagi8746
    @andreagi8746 11 месяцев назад +1

    How is the current support for this?

    • @yourDecisi0n
      @yourDecisi0n 11 месяцев назад +1

      Seems to be very good, all major browsers support it

  • @genechristiansomoza4931
    @genechristiansomoza4931 11 месяцев назад

    Is popover different from dialog 🤔

  • @darwish-mammo
    @darwish-mammo 9 месяцев назад

    Bootstrap => modal 👏🏻

    • @ilogbc3090
      @ilogbc3090 8 месяцев назад +1

      bootstrap sucks

    • @darwish-mammo
      @darwish-mammo 8 месяцев назад

      @@ilogbc3090 disagree 👎

  • @User-wm2tx2hn6w
    @User-wm2tx2hn6w 10 месяцев назад

    That's so cool 🤯

  • @AntonioRonde
    @AntonioRonde 10 месяцев назад

    Is this like a DIY htmx?

  • @Azmeroth1370
    @Azmeroth1370 11 месяцев назад

    I know this is off topic but this is your newest video and will grab your attention easier.
    How do I make a button in a grid be worth two column spaces without messing it up?

    • @RavenRustFan
      @RavenRustFan 11 месяцев назад

      grid-column:span 2;
      That should help 🤔

    • @Azmeroth1370
      @Azmeroth1370 11 месяцев назад

      @@RavenRustFan THANK YOU

    • @RavenRustFan
      @RavenRustFan 11 месяцев назад

      @@Azmeroth1370 🙂👍

    • @Azmeroth1370
      @Azmeroth1370 11 месяцев назад

      @@RavenRustFan do you know how to set a canvas width to 100% of screen?

  • @RootsterAnon
    @RootsterAnon 11 месяцев назад

    tf you mean "open" is not prefered way of opening it? -htmx

  • @jlbiah
    @jlbiah 10 месяцев назад

    Awesome 👍🏼👍🏼👍🏼

  • @trsd8640
    @trsd8640 10 месяцев назад

    Great! I love it! =D

  • @joejavacavalier2001
    @joejavacavalier2001 11 месяцев назад

    Is it draggable?

  • @ScriptEnabled
    @ScriptEnabled 10 месяцев назад

    Good one

  • @frontend_ko
    @frontend_ko 11 месяцев назад

    Can i use it??

  • @madhurchaturvedi5551
    @madhurchaturvedi5551 11 месяцев назад

    Will it work for mega drop down too ??

  • @СашаМартен
    @СашаМартен 11 месяцев назад

    You professor 💯👌👌

  • @ThomasLe
    @ThomasLe 9 месяцев назад

    that's not "dot dot" that's "colon colon" :)

  • @bburns
    @bburns 11 месяцев назад

    Whaaat? I didnt know this existed!

  • @Yaqins
    @Yaqins 10 месяцев назад

    Until they support open/close callback and transition customization, then no thanks. I'll stick with custom modal.

  • @Therealskythe
    @Therealskythe 11 месяцев назад

    Like so many new HTML elements, this is cool, but useless for any projects that go beyond the most basic styling.
    - backdrop does not inherit css variables (i.e. colors)
    - open / close is done by display block / none, so it's impossible to animate the appearance via transitions. You have to re-write everything manually to make transitions possible.
    - backdrop is not hidden, but removed on hide, so even when you re-wrote the dialog to allow for transitions, the backdrop will not work with them

    • @jonaslamprecht9169
      @jonaslamprecht9169 10 месяцев назад

      Yeah, I would personally not use it.

    • @jason_v12345
      @jason_v12345 9 месяцев назад

      Yeah, I mean, really how hard is to reproduce this with a div? Not hard at all.

  • @intersuccessive
    @intersuccessive 11 месяцев назад

    Nice!

  • @ajiteshmishra0005
    @ajiteshmishra0005 11 месяцев назад

    Whatever video you have uploaded based on this concept, share the link in comments or you can pin in the comment section

  • @lancemarchetti8673
    @lancemarchetti8673 11 месяцев назад

    Brilliant

  • @jamessullenriot
    @jamessullenriot 10 месяцев назад

    My past short was a vanilla ice short - this is like vanilla ice teaching js

  • @MrJohnyJumper
    @MrJohnyJumper 11 месяцев назад

    What if you want to have 2-3 different dialogs on a page. Let say button A is opening the first button and buttonB is opening the second different one. How can we differentiate the dialogs using this html element?

    • @ziel-ww
      @ziel-ww 11 месяцев назад

      id's

  • @anmeno
    @anmeno 11 месяцев назад +2

    Safari......

    • @yourDecisi0n
      @yourDecisi0n 11 месяцев назад

      It does work on Safari

    • @anmeno
      @anmeno 11 месяцев назад

      @@yourDecisi0n, yes from v15.4 but there are still users on older versions of Safari on the fruit phone....

    • @yourDecisi0n
      @yourDecisi0n 11 месяцев назад +1

      ​@@anmeno This goes down to an iPhone 6s, which is even below normal for an average person to own. The iPhone 6s is now 8 years old. So, I don't expect you to run into too much trouble there

  • @sinahosseini6263
    @sinahosseini6263 9 месяцев назад

    😮

  • @rishiraj2548
    @rishiraj2548 11 месяцев назад

    🗨💬

  • @allirey6196
    @allirey6196 11 месяцев назад

    it's not amazing, it works improperly in React. And who needs this element in plain HTML?

    • @tranquangthang8897
      @tranquangthang8897 11 месяцев назад +4

      Why not it provide a simple way to create a modal with just vanilla html and css. The web revolve around html not React.

    • @erikslorenz
      @erikslorenz 11 месяцев назад +2

      Is the goal of the web to follow react? Lol

    • @veedjohnson
      @veedjohnson 11 месяцев назад

      The state of frontend developers these days lol

    • @thatsalot3577
      @thatsalot3577 10 месяцев назад

      Well I make stuff in react and vite and after reading your comment, I understand why Prime is so critical of react 💀

  • @justrising4027
    @justrising4027 11 месяцев назад


    Hi @WebDevSimplified I am currently working on a project, but I am getting some issues in updating a part of the page with JS. Can I please get a hand on this?