$30 off During Our Annual Pro Sale. View Details »

TIL about showModal (from small things big things one day come)

TIL about showModal (from small things big things one day come)

modal dialogs:
- the `dialog` element, its `open` attribute and its `showModal` and `close` methods
- the `inert` attribute
- a lightbox implemented as progressive enhancement

links to resources and codepens at https://noti.st/gunnarbittersmann/GBW9Pt/til-about-showmodal-from-small-things-big-things-one-day-come

Gunnar Bittersmann

January 13, 2023
Tweet

More Decks by Gunnar Bittersmann

Other Decks in Programming

Transcript

  1. big
    things one day come
    from small things
    TIL about


    showModal

    View Slide

  2. View Slide

  3. dialog
    The dialog element represents a part of an application
    that a user interacts with to perform a task, for example
    a dialog box, inspector, or window.

    View Slide

  4. View Slide

  5. inert
    The inert attribute is a boolean attribute that indicates,
    by its presence, that the element and all its
    fl
    at tree
    descendants which don’t otherwise escape inertness
    (such as modal dialogs) are to be made inert by the user
    agent.

    View Slide

  6. View Slide

  7. show


    Modal
    The showModal method displays the dialog element
    and makes it the top-most modal dialog.

    View Slide

  8. View Slide

  9. big
    things one day come
    from small things
    TIL about


    showModal

    View Slide