Floating dock
A row of icon tiles that floats over the page. A tile lifts and names itself on hover or focus, and the open one is filled with a dot under it.
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-navigation-floating-dock">
<div class="deck"><nav class="dock" aria-label="Dispatch dock"><ul>
<li><a href="#" aria-label="Board" aria-current="page"><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="M4 11l8-7 8 7v9H4z"/><path d="M10 20v-6h4v6"/></svg><span class="tip" aria-hidden="true">Board</span></a></li>
<li><a href="#" aria-label="Loads, 4 need a driver"><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="M2 6h11v10H2zM13 9h4.5L21 12.5V16h-8z"/><circle cx="6.5" cy="17.5" r="1.8"/><circle cx="17" cy="17.5" r="1.8"/></svg><span class="badge" aria-hidden="true">4</span><span class="tip" aria-hidden="true">Loads</span></a></li>
<li><a href="#" aria-label="Live map"><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="M12 21s-6.5-6-6.5-11a6.5 6.5 0 0 1 13 0c0 5-6.5 11-6.5 11z"/><circle cx="12" cy="10" r="2.3"/></svg><span class="tip" aria-hidden="true">Live map</span></a></li>
<li><a href="#" aria-label="Drivers"><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"><circle cx="12" cy="8" r="4"/><path d="M4 21c1.5-4 4.5-6 8-6s6.5 2 8 6"/></svg><span class="tip" aria-hidden="true">Drivers</span></a></li>
<li><a href="#" aria-label="Rota"><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"><rect x="3" y="5" width="18" height="16" rx="1"/><path d="M3 10h18M8 3v4M16 3v4"/></svg><span class="tip" aria-hidden="true">Rota</span></a></li>
<li class="sep" aria-hidden="true"></li>
<li><a href="#" aria-label="Depot settings"><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"><circle cx="12" cy="12" r="3"/><path d="M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M4.9 19.1L7 17M17 7l2.1-2.1"/></svg><span class="tip" aria-hidden="true">Depot settings</span></a></li>
</ul></nav></div>
</div>
.ukc-navigation-floating-dock { 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-navigation-floating-dock *, .ukc-navigation-floating-dock *::before, .ukc-navigation-floating-dock *::after { box-sizing: border-box; }
.ukc-navigation-floating-dock :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-navigation-floating-dock :where(ul, ol) { padding: 0; list-style: none; }
.ukc-navigation-floating-dock :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-navigation-floating-dock :where(a) { color: inherit; }
.ukc-navigation-floating-dock svg { flex: none; }
.ukc-navigation-floating-dock { container-type: inline-size; inline-size: 100%; }
.ukc-navigation-floating-dock .deck { display: flex; justify-content: center; padding: 52px 8px 18px; border-radius: var(--uk-radius-lg); background: radial-gradient(color-mix(in srgb, var(--uk-ink) 16%, transparent) 1px, transparent 1.5px) 0 0 / 14px 14px, var(--uk-surface); }
.ukc-navigation-floating-dock .dock { padding: 6px 6px 11px; border: var(--uk-border-width) solid var(--uk-line); border-radius: var(--uk-radius-lg); background: var(--uk-paper); box-shadow: var(--uk-shadow-float); }
.ukc-navigation-floating-dock ul { display: flex; align-items: flex-end; gap: 4px; }
.ukc-navigation-floating-dock .sep { width: 1px; align-self: stretch; margin: 6px 3px; background: var(--uk-line); }
.ukc-navigation-floating-dock a { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: min(var(--uk-radius-md), 12px); color: var(--uk-muted); text-decoration: none; transform-origin: bottom center; transition: transform var(--uk-motion-duration) var(--uk-motion-ease), background-color var(--uk-motion-duration) var(--uk-motion-ease), color var(--uk-motion-duration) var(--uk-motion-ease); }
.ukc-navigation-floating-dock a:hover, .ukc-navigation-floating-dock a:focus-visible { transform: translateY(-4px) scale(1.12); background: var(--ink-soft); color: var(--uk-ink); }
.ukc-navigation-floating-dock a:focus-visible { outline: 2px solid var(--uk-accent); outline-offset: 2px; }
.ukc-navigation-floating-dock a[aria-current] { background: var(--uk-ink); color: var(--uk-paper); }
.ukc-navigation-floating-dock a[aria-current]::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--uk-ink); }
.ukc-navigation-floating-dock .badge { position: absolute; top: 2px; right: 2px; min-width: 16px; padding: 0 4px; border-radius: 999px; background: var(--uk-highlight); color: color-mix(in srgb, var(--uk-ink) 15%, black); font-family: var(--uk-font-mono, ui-monospace, monospace); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--uk-paper); }
.ukc-navigation-floating-dock .tip { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); padding: 2px 8px; border-radius: min(var(--uk-radius-sm), 6px); background: var(--uk-ink); color: var(--uk-paper); font-size: 12px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--uk-motion-duration) var(--uk-motion-ease); }
.ukc-navigation-floating-dock a:hover .tip, .ukc-navigation-floating-dock a:focus-visible .tip { opacity: 1; }
@container (max-width: 350px) { .ukc-navigation-floating-dock a { width: 36px; height: 36px; } .ukc-navigation-floating-dock ul { gap: 2px; } }
@media (prefers-reduced-motion: reduce) { .ukc-navigation-floating-dock a, .ukc-navigation-floating-dock .tip { transition: none; } .ukc-navigation-floating-dock a:hover, .ukc-navigation-floating-dock a:focus-visible { transform: none; } }