diff --git a/docs/modal.html b/docs/modal.html index ecf39f76..ea892b5b 100644 --- a/docs/modal.html +++ b/docs/modal.html @@ -64,9 +64,24 @@ </article> </dialog>
Pico does not include JavaScript code. You will need to implement your JS to interact with modals.
As a starting point, you can look at the JavaScript used in this documentation: js/modal.js.
To make a modal appear, add the open
attribute to the <dialog>
container.
<!-- Open modal-->
<dialog open>
+ <article>
+ …
+ </article>
</dialog>
<!-- Modal closed -->
<dialog>
+ <article>
+ …
+ </article>
</dialog>
-
Modals come with 3 utility classes.
<html class="modal-is-open">
blurs the background and blocks any scrolling and interactions below the modal.
<html class="modal-is-opening">
brings an opening animation.
<html class="modal-is-closing">
brings a closing animation.