Components / Tooltips and popovers
Price tag hotspots
Dots on a picture that each pull out a paper price tag with the name, the price, and what is left. For shop the look and labelled diagrams.
Tall mug$28 · 6 left
Bud vase$34 · 3 left
Noodle bowl$42 · 2 left
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-tooltip-price-tag">
<figure class="look">
<div class="scene">
<svg viewBox="0 0 280 130" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 113h264M44 113v10M236 113v10"/><path d="M30 62h38v44a6 6 0 0 1-6 6H36a6 6 0 0 1-6-6z"/><path d="M68 72h5a9 11 0 0 1 0 22h-5"/><path d="M115 32c0 14-17 26-17 48 0 18 10 32 22 32s22-14 22-32c0-22-17-34-17-48z"/><path d="M120 32V12M120 22c7-1 10-5 10-11"/><path d="M196 84h60c0 16-12 28-30 28s-30-12-30-28z"/></svg>
<span class="spot" style="--x: 17.5%; --y: 66%"><button type="button" aria-label="Tall mug" aria-describedby="ukc-tooltip-price-tag-mug"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg></button><span class="tag" role="tooltip" id="ukc-tooltip-price-tag-mug"><b>Tall mug</b><span>$28 · 6 left</span></span></span>
<span class="spot show" style="--x: 43%; --y: 47%"><button type="button" aria-label="Bud vase" aria-describedby="ukc-tooltip-price-tag-vase"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg></button><span class="tag" role="tooltip" id="ukc-tooltip-price-tag-vase"><b>Bud vase</b><span>$34 · 3 left</span></span></span>
<span class="spot flip" style="--x: 80.5%; --y: 75%"><button type="button" aria-label="Noodle bowl" aria-describedby="ukc-tooltip-price-tag-bowl"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg></button><span class="tag" role="tooltip" id="ukc-tooltip-price-tag-bowl"><b>Noodle bowl</b><span>$42 · 2 left</span></span></span>
</div>
<figcaption>Autumn firing, ash glaze. Point at a dot for the price.</figcaption>
</figure>
</div>
.ukc-tooltip-price-tag { 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-tooltip-price-tag *, .ukc-tooltip-price-tag *::before, .ukc-tooltip-price-tag *::after { box-sizing: border-box; }
.ukc-tooltip-price-tag :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-tooltip-price-tag :where(ul, ol) { padding: 0; list-style: none; }
.ukc-tooltip-price-tag :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-tooltip-price-tag :where(a) { color: inherit; }
.ukc-tooltip-price-tag svg { flex: none; }
.ukc-tooltip-price-tag .look { margin: 0; max-width: 360px; display: grid; gap: 8px; }
.ukc-tooltip-price-tag .scene { position: relative; border: var(--uk-border-width) solid var(--uk-line); border-radius: min(var(--uk-radius-lg), 12px); background: var(--uk-surface); }
.ukc-tooltip-price-tag .scene svg { display: block; width: 100%; height: auto; color: var(--uk-ink); }
.ukc-tooltip-price-tag .spot { position: absolute; left: var(--x); top: var(--y); width: 24px; height: 24px; margin: -12px 0 0 -12px; }
.ukc-tooltip-price-tag .spot button { position: relative; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 2px solid var(--uk-paper); border-radius: 999px; background: var(--uk-ink); color: var(--uk-paper); cursor: pointer; }
.ukc-tooltip-price-tag .spot button svg { width: 12px; height: 12px; transition: transform var(--uk-motion-duration) var(--uk-motion-ease); }
.ukc-tooltip-price-tag .spot:hover button svg, .ukc-tooltip-price-tag .spot:focus-within button svg, .ukc-tooltip-price-tag .spot.show button svg { transform: rotate(45deg); }
.ukc-tooltip-price-tag .scene:has(.spot:hover, .spot:focus-within) .spot.show:not(:hover, :focus-within) button svg { transform: none; }
.ukc-tooltip-price-tag .spot button::after { content: ""; position: absolute; inset: -7px; border: 1px solid var(--uk-ink); border-radius: 999px; opacity: 0; animation: ukc-tooltip-price-tag-pulse 2.6s ease-out infinite; }
@keyframes ukc-tooltip-price-tag-pulse { 0% { transform: scale(0.6); opacity: 0.8; } 70%, 100% { transform: scale(1.2); opacity: 0; } }
.ukc-tooltip-price-tag .spot button:focus-visible { outline: 2px solid var(--uk-accent); outline-offset: 3px; }
.ukc-tooltip-price-tag .tag { position: absolute; z-index: 2; left: calc(100% + 5px); top: 50%; width: max-content; display: grid; padding: 6px 12px 7px 25px; background: var(--uk-highlight); color: color-mix(in srgb, var(--uk-ink) 15%, black); font-size: 13px; line-height: 1.3; clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%); transform: translateY(-50%) rotate(-3deg); transform-origin: 0 50%; }
.ukc-tooltip-price-tag .tag::before { content: ""; position: absolute; left: 11px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 999px; background: var(--uk-surface); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--uk-ink) 15%, black); }
.ukc-tooltip-price-tag .tag span { font-family: var(--uk-font-mono, ui-monospace, monospace); font-size: 11.5px; }
.ukc-tooltip-price-tag .spot.flip .tag { left: auto; right: calc(100% + 5px); padding: 6px 25px 7px 12px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); transform: translateY(-50%) rotate(3deg); transform-origin: 100% 50%; }
.ukc-tooltip-price-tag .spot.flip .tag::before { left: auto; right: 11px; }
.ukc-tooltip-price-tag figcaption { font-size: 13px; color: var(--uk-muted); }
.ukc-tooltip-price-tag .spot .tag { visibility: hidden; opacity: 0; transition: opacity var(--uk-motion-duration) var(--uk-motion-ease), visibility 0s linear var(--uk-motion-duration); }
.ukc-tooltip-price-tag .spot:hover .tag, .ukc-tooltip-price-tag .spot:focus-within .tag, .ukc-tooltip-price-tag .spot.show .tag { visibility: visible; opacity: 1; transition-delay: 0s; }
.ukc-tooltip-price-tag .scene:has(.spot:hover, .spot:focus-within) .spot.show:not(:hover, :focus-within) .tag { visibility: hidden; opacity: 0; }
@media (prefers-reduced-motion: reduce) { .ukc-tooltip-price-tag .spot .tag { transition: none; } }
@media (prefers-reduced-motion: reduce) { .ukc-tooltip-price-tag .spot button::after { animation: none; } .ukc-tooltip-price-tag .spot button svg { transition: none; } }
More tooltips and popovers
All 26Loaves sold per hour - Today
- Last Saturday
- 7:00 to 8:00Today12Last Sat102 more than last week
- 8:00 to 9:00Today31Last Sat265 more than last week
- 9:00 to 10:00Today44Last Sat359 more than last week
- 10:00 to 11:00Today38Last Sat413 fewer than last week
- 11:00 to 12:00Today52Last Sat4012 more than last week
- 12:00 to 13:00Today47Last Sat3611 more than last week
- 13:00 to 14:00Today29Last Sat301 fewer than last week
- 14:00 to 15:00Today18Last Sat224 fewer than last week
Marsh Road Velo · Thursday note
Clocks went back, so we roll out at 8:30 sharp. This Sunday is the Old Quarry LoopMmarshroadvelo.ccOld Quarry Loop62 km840 m upCafe at km 38, ridden anticlockwise, with the stop at Hollin Bridge.
Lane rates per mile, week 48 Lane Fuel Rate Reno to Boise $0.42 $2.10 Reno to Fresno $0.42 Ines Cabral Tue 24 NovUp 30 cents. Chain controls on Donner Pass add about two hours each way. Reno to Salt Lake $0.47 Marek Dvorak Mon 23 NovHeld flat. Two carriers still want backhauls out of Utah. Reno to Portland $0.44 $2.30 - 0:00 to 2:14WrenClose by, in the bramble at the gate
- 2:14 to 3:50BlackbirdLoud on the left, top of the alder
- 3:50 to 5:30Reed warblerChattering low in the reeds
- 5:30 to 6:40CuckooFar off, across the water
Dawn chorus, Holme Marsh