![]() |
VOOZH | about |
Spectre Modals are flexible dialog prompts, the Spectre Modal component is a dialog box/popup window that is displayed on top of the current page, once the trigger button is clicked. However, clicking on the modalβs backdrop automatically closes the modal.
We can also define the size of the modal by using Spectre Modal sizes, to create a modal you need to use the modal class first then you have to mention the modal size like modal-sm is denoting small size modal.
Spectre Modal Types:
Spectre Modal Classes:
Syntax: All the classes are mentioned in this syntax.
<div class="modal modal-size-class"> <a href="#" class="modal-overlay"></a> <div class="modal-container"> <div class="modal-header"> <a href="#"></a> <div class="modal-title">..</div> </div> <div class="modal-body"> ... </div> <div class="modal-footer"> ... </div> </div> </div>
The below examples illustrate the Spectre Modal:
Example 1: In this example, we will create a regular modal.
Output:
Example 2: In this example, we will create the large modal.
Output:
π Spectre ModalsReference: https://picturepan2.github.io/spectre/components/modals.html