<button commandfor="only-html" command="show-modal">Open a modal (only HTML)</button> <dialog id="only-html"> <p>Hello 👋. Nice to meet you!</p> <p><i><b>(Opened with only HTML)</b></i></p> <form method="dialog"> <button>Close</button> </form> </dialog>
Open a modal (only HTML) Open a modal (with JS) Open a dialog (with JS, because no invokers for simple dialogs) Open a modal with customized backdrop Open a modal like a drawer
Hello 👋. Nice to meet you!
(Opened with only HTML)
(Opened with only JS)
(Customized backdrop)
(As a drawer)