Components / Modals and sheets
Centered dialog
A roomy dialog with a large heading, plain text, and buttons in a row on the left, closed from the corner.
Are you sure you want to leave?
You have answers that are not saved. If you leave now, you will need to start the application again.
The code
Plain HTML and CSS on your kit's variables. Put it next to tokens/variables.css from your kit's files and it draws in your look.
<div class="ukc-modal-uswds-modal">
<div class="bd"><div class="dlg" role="dialog" aria-modal="true" aria-labelledby="ukc-um">
<button class="x" type="button" aria-label="Close"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 6l12 12M18 6L6 18"/></svg></button>
<h3 id="ukc-um">Are you sure you want to leave?</h3>
<p>You have answers that are not saved. If you leave now, you will need to start the application again.</p>
<div class="row"><button class="btn pri" type="button">Stay on this page</button><button class="link" type="button">Leave anyway</button></div>
</div></div>
</div>
.ukc-modal-uswds-modal { position: relative; font-family: var(--uk-font-body, system-ui, sans-serif); color: var(--uk-ink); font-size: 15px; line-height: 1.5;
--tint: color-mix(in srgb, var(--uk-accent) 12%, var(--uk-paper));
--tint-strong: color-mix(in srgb, var(--uk-accent) 22%, var(--uk-paper));
--accent-deep: color-mix(in srgb, var(--uk-accent) 72%, black);
--ink-soft: color-mix(in srgb, var(--uk-ink) 8%, var(--uk-paper));
--line-strong: color-mix(in srgb, var(--uk-ink) 32%, var(--uk-paper));
--danger-tint: color-mix(in srgb, var(--uk-danger) 12%, var(--uk-paper));
--high-tint: color-mix(in srgb, var(--uk-highlight) 28%, var(--uk-paper)); }
.ukc-modal-uswds-modal *, .ukc-modal-uswds-modal *::before, .ukc-modal-uswds-modal *::after { box-sizing: border-box; }
.ukc-modal-uswds-modal :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-modal-uswds-modal :where(ul, ol) { padding: 0; list-style: none; }
.ukc-modal-uswds-modal :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-modal-uswds-modal :where(a) { color: inherit; }
.ukc-modal-uswds-modal svg { flex: none; }
.ukc-modal-uswds-modal .bd { display: grid; place-items: center; padding: 28px 16px; border-radius: var(--uk-radius-lg); background: color-mix(in srgb, color-mix(in srgb, var(--uk-ink) 20%, black) 50%, transparent); }
.ukc-modal-uswds-modal .dlg { width: 100%; max-width: 440px; background: var(--uk-paper); border-radius: var(--uk-radius-lg); box-shadow: 0 20px 50px color-mix(in srgb, color-mix(in srgb, var(--uk-ink) 20%, black) 35%, transparent); }
.ukc-modal-uswds-modal .btn { padding: 9px 16px; border: 1px solid var(--uk-line); border-radius: var(--uk-radius-md); background: var(--uk-paper); font-weight: 600; cursor: pointer; }
.ukc-modal-uswds-modal .btn.pri { background: var(--uk-accent); border-color: transparent; color: var(--uk-accent-ink); }
.ukc-modal-uswds-modal .btn.danger { background: var(--uk-danger); border-color: transparent; color: var(--uk-paper); }
.ukc-modal-uswds-modal .dlg { position: relative; padding: 36px 32px 28px; display: grid; gap: 14px; max-width: 500px; }
.ukc-modal-uswds-modal h3 { font-size: 24px; font-family: var(--uk-font-display, inherit); line-height: 1.15; }
.ukc-modal-uswds-modal .x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; }
.ukc-modal-uswds-modal .row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 6px; }
.ukc-modal-uswds-modal .link { border: 0; background: none; color: var(--uk-accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
More modals and sheets
All 25Rename branch
Delete "Kitchen reframe"?
This deletes 14 job sheets, 48 photos, and 3 draft invoices. Sent invoices stay with your clients.
INV-0412
- Esc
Invoices
- New invoiceN
- INV-0412 · Reyes Framing
- INV-0411 · Whitfield Homes
Actions
- Invite to crewI