Modal dialog for confirming potentially destructive or important actions. Provides a clear title, message, and two action buttons (primary and secondary). Used for delete confirmations, cancellations, and other user confirmations in CRUD workflows.
Context = Physical placement in the layout (standard
page vs. glassy overlay/hero).
Theme = Site-wide user preference (light/dark mode
toggle 🌙).
The signed-in app uses GLASSY context for modals. Below previews show both Standard and Glassy contexts. Use the 🌙 toggle (top-right) to test how modals look in both themes. Modals should work correctly in all 4 combinations: Light+Standard, Light+Glassy, Dark+Standard, Dark+Glassy.
Confirm Modal ensures users explicitly confirm important or destructive actions before proceeding.
Neutral confirmation modal for non-destructive actions. Use when confirming standard operations (e.g., "Are you sure you want to proceed?"). Primary button uses standard green styling.
For use on normal app pages and content areas
<!-- Modal backdrop with overlay -->
<div class="modal-backdrop">
<!-- Confirm modal dialog -->
<div
class="confirm-modal"
role="dialog"
aria-modal="true"
aria-labelledby="confirm-modal-title"
aria-describedby="confirm-modal-message">
<!-- Header with title and close button -->
<div class="confirm-modal-header">
<h2 class="confirm-modal-title" id="confirm-modal-title">Confirm Action</h2>
<button class="confirm-modal-close" aria-label="Close dialog">
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
<!-- Message body -->
<p class="confirm-modal-message" id="confirm-modal-message">
Are you sure you want to proceed with this action? This cannot be undone.
</p>
<!-- Action buttons -->
<div class="confirm-modal-actions">
<button class="btn btn--secondary">Cancel</button>
<button class="btn btn--primary">Confirm</button>
</div>
</div>
</div>
For use on dark overlays and app content containers (signed-in pages)
<!-- Modal backdrop with glassy overlay -->
<div class="modal-backdrop is-glassy">
<!-- Confirm modal dialog with glassy styling -->
<div
class="confirm-modal is-glassy"
role="dialog"
aria-modal="true"
aria-labelledby="confirm-modal-title"
aria-describedby="confirm-modal-message">
<!-- Header with title and close button -->
<div class="confirm-modal-header">
<h2 class="confirm-modal-title" id="confirm-modal-title">Confirm Action</h2>
<button class="confirm-modal-close" aria-label="Close dialog">
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
<!-- Message body -->
<p class="confirm-modal-message" id="confirm-modal-message">
Are you sure you want to proceed with this action? This cannot be undone.
</p>
<!-- Action buttons: use glass variants for glassy context -->
<div class="confirm-modal-actions">
<button class="btn btn--secondary-glass">Cancel</button>
<button class="btn btn--glass">Confirm</button>
</div>
</div>
</div>
Destructive confirmation modal for delete and other destructive actions. Use red/danger button styling to emphasize the destructive nature. Example: "Are you sure you want to delete this record? This action cannot be undone."
For use on normal app pages and content areas
<!-- Modal backdrop with overlay -->
<div class="modal-backdrop">
<!-- Destructive confirmation modal -->
<div
class="confirm-modal"
role="dialog"
aria-modal="true"
aria-labelledby="confirm-modal-title"
aria-describedby="confirm-modal-message">
<!-- Header with title and close button -->
<div class="confirm-modal-header">
<h2 class="confirm-modal-title" id="confirm-modal-title">Delete Record</h2>
<button class="confirm-modal-close" aria-label="Close dialog">
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
<!-- Message body -->
<p class="confirm-modal-message" id="confirm-modal-message">
Are you sure you want to delete this record? This action cannot be undone and will permanently remove all associated data.
</p>
<!-- Action buttons: primary is now danger/delete -->
<div class="confirm-modal-actions">
<button class="btn btn--secondary">Cancel</button>
<button class="btn btn--danger">Delete</button>
</div>
</div>
</div>
For use on dark overlays and app content containers (signed-in pages)
<!-- Modal backdrop with glassy overlay -->
<div class="modal-backdrop is-glassy">
<!-- Destructive confirmation modal with glassy styling -->
<div
class="confirm-modal is-glassy"
role="dialog"
aria-modal="true"
aria-labelledby="confirm-modal-title"
aria-describedby="confirm-modal-message">
<!-- Header with title and close button -->
<div class="confirm-modal-header">
<h2 class="confirm-modal-title" id="confirm-modal-title">Delete Record</h2>
<button class="confirm-modal-close" aria-label="Close dialog">
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
<!-- Message body -->
<p class="confirm-modal-message" id="confirm-modal-message">
Are you sure you want to delete this record? This action cannot be undone and will permanently remove all associated data.
</p>
<!-- Action buttons: secondary glass, danger primary (works on glass) -->
<div class="confirm-modal-actions">
<button class="btn btn--secondary-glass">Cancel</button>
<button class="btn btn--danger">Delete</button>
</div>
</div>
</div>
btn--danger
for destructive primary actions
btn--secondary
or
btn--secondary-glass
for cancel
aria-labelledby
and
aria-describedby
role="dialog"
on modal container
aria-modal="true"
to indicate modal behavior
aria-labelledby="[title-id]"
references the title element
aria-describedby="[message-id]"
references the message element
.btn--primary
and
.btn--secondary
.btn--glass
and
.btn--secondary-glass
.btn--danger
in both contexts (red is universal for danger)
.is-glassy
class to backdrop in glassy context
Modal CSS is defined inline in this documentation page for preview
purposes. In production, move
.confirm-modal,
.confirm-modal-*, and
.modal-backdrop
styles to a dedicated
confirm-modal.css
file if reusing across multiple pages.