Examples of building modals with HydraCSS.
<button type="button" class="btn btn-primary modal-open" data-modal-id="modal">Modal demo</button>
<div class="modal" aria-hidden="true" id="modal">
<div class="modal-overlay">
<div class="modal-container">
<div class="modal-header">
<p class="modal-title">Headline 🔥</p>
<div class="modal-close"></div>
</div>
<div class="modal-content">
<p>This is a completely accessible modal.</p>
<p> Try hitting the <code>tab</code> key* and notice how the focus stays within the modal itself. To close modal hit the <code>esc</code> button, click on the overlay or just click the close button. </p>
<p> <small>* <code>alt+tab</code> in safari</small> </p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary btn-small">Continue</button>
<button type="button" class="btn btn-secondary btn-small modal-close">Close</button>
</div>
</div>
</div>
</div>
ON THIS PAGE