Components / Modals and sheets
Popover menu
A menu anchored to its button, with groups split by a rule and the destructive item last, in red.
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-popover-menu">
<div class="wrapx"><button class="trigger" type="button" aria-expanded="true"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/></svg></button><div class="menu" role="menu">
<button role="menuitem" type="button"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="8" y="8" width="12" height="12" rx="1"/><path d="M16 8V4H4v12h4"/></svg> Duplicate <kbd>⌘D</kbd></button>
<button role="menuitem" type="button"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 4h6v6M20 4l-9 9M18 14v6H4V6h6"/></svg> Open in new tab</button>
<hr>
<button role="menuitem" type="button"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 6h6l2 2h10v11H3z"/></svg> Move to…</button>
<hr>
<button role="menuitem" type="button" class="bad"><svg width="15" height="15" 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> Delete</button>
</div></div>
</div>
.ukc-modal-popover-menu { 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-popover-menu *, .ukc-modal-popover-menu *::before, .ukc-modal-popover-menu *::after { box-sizing: border-box; }
.ukc-modal-popover-menu :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-modal-popover-menu :where(ul, ol) { padding: 0; list-style: none; }
.ukc-modal-popover-menu :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-modal-popover-menu :where(a) { color: inherit; }
.ukc-modal-popover-menu svg { flex: none; }
.ukc-modal-popover-menu .wrapx { position: relative; height: 230px; max-width: 320px; }
.ukc-modal-popover-menu .trigger { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--uk-line); border-radius: var(--uk-radius-md); background: var(--ink-soft); cursor: pointer; }
.ukc-modal-popover-menu .menu { position: absolute; top: 40px; left: 0; width: 230px; padding: 4px; border: 1px solid var(--uk-line); border-radius: var(--uk-radius-md); background: var(--uk-paper); box-shadow: var(--uk-shadow-float, 0 10px 30px rgba(0,0,0,0.14)); }
.ukc-modal-popover-menu .menu button { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 0; border-radius: var(--uk-radius-sm); background: transparent; font-size: 14px; text-align: left; cursor: pointer; }
.ukc-modal-popover-menu .menu button:hover { background: var(--ink-soft); }
.ukc-modal-popover-menu .menu .bad { color: var(--uk-danger); }
.ukc-modal-popover-menu hr { margin: 4px 0; border: 0; border-top: 1px solid var(--uk-line); }
.ukc-modal-popover-menu kbd { font-family: var(--uk-font-mono, ui-monospace, monospace); font-size: 11px; color: var(--uk-muted); }
More modals and sheets
All 25North wall, before drywall3 / 48 Choose your location
$2,140 received
Alder Street Homes paid invoice 1042 by bank transfer. It reaches your account within two working days.
- 1:42left
Still there?
The patient portal signs you out after 15 quiet minutes, so nobody else at this screen can read your records. Your refill request for Dr. Okafor is saved as a draft.
Signing out at 2:47 pm