Menu
Overview
General
ButtonBadgePillsAvatarBrand lockupLayout
ContainerGrid & RowSurface & text utilitiesApp shellPage headerData Display
CardTableChartsCalendarStatsBulletsLeadersLogo wallCollapse & DisclosureTimelineValue chainDescriptionsFeedback
AlertProgressModalSlide-overSkeletonEmpty stateForms
Field & InputDropdownLead form & CTA rowDate pickerFilter barNavigation
NavSide navigationTop navigationApp switcherUser menuStepperTabsBreadcrumbPaginationTemplates
Sign-in pageSigned-out pageSettings layoutTheming
Browser tabProduct themesFeedback
Modal
In-page detail dialog, native dialog gives focus trap, Esc, and inert background.
.modal · .modal__backdrop · .modal__actions · .modal-close · .vdialog
<dialog class="vdialog" open style="position:static;margin:0">
<div class="vdialog__head">
<h3 style="margin:0">novatrust</h3>
<button class="modal-close" aria-label="Close">×</button>
</div>
<div class="vdialog__body">
<h4>What it covers</h4>
<ul class="bullets">
<li>HSM as a Service, key management, encryption and tokenisation.</li>
<li>24/7 SOC, fraud prevention, post-quantum resilience.</li>
</ul>
</div>
</dialog>
<button class="btn btn--primary" onclick="this.nextElementSibling.showModal()">Open dialog</button>
<dialog class="vdialog">
<div class="vdialog__head">
<h3 style="margin:0">Dialog title</h3>
<button class="modal-close" aria-label="Close" onclick="this.closest('dialog').close()">×</button>
</div>
<p class="muted">Native <code>dialog.showModal()</code> gives focus trap, Esc to close, and an inert background.</p>
<div class="modal__actions">
<button class="btn btn--secondary" onclick="this.closest('dialog').close()">Cancel</button>
<button class="btn btn--primary" onclick="this.closest('dialog').close()">Confirm</button>
</div>
</dialog>
Usage
- Prefer native
<dialog class="vdialog">, the browser provides focus management and Esc for free. - A click anywhere outside the dialog, on the backdrop, closes it, the same as Cancel. The console script does this for every dialog opened with
showModal(). A framework that renders the dialog from its own state still opens it that way, by callingnovusAdmin.showModal(dialog)after render, never by drawing it with theopenattribute, which leaves it in the page flow with no backdrop; it clears that state on the dialog'scloseevent. - Content that must stay reachable with JS off belongs in a
<details>disclosure, not a modal. - Actions sit right-aligned in
.modal__actions; the primary action is last.