Skip to content

macOS Dock

A copy-paste sidebars & docks component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

Sidebars & DocksHTMLCSSany framework

Copy into your project

HTML
<div class="nuda-dock">
  <button class="nuda-dock__icon" style="background:#ff5e7a"></button>
  <button class="nuda-dock__icon" style="background:#ffb45e"></button>
  <button class="nuda-dock__icon" style="background:#e4ff54"></button>
  <button class="nuda-dock__icon" style="background:#62b6ff"></button>
  <button class="nuda-dock__icon" style="background:#9d6dff"></button>
  <button class="nuda-dock__icon" style="background:#6ee7b7"></button>
</div>
CSS
.nuda-dock {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  backdrop-filter: blur(12px);
}

.nuda-dock__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    margin 0.25s;
  box-shadow:
    0 6px 16px -8px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 6px rgba(0, 0, 0, 0.2);
}

.nuda-dock__icon:hover {
  transform: translateY(-12px) scale(1.4);
  margin: 0 8px;
}

/* Magnify neighbors with :has() */
.nuda-dock__icon:has(+ :hover),
.nuda-dock__icon:hover + .nuda-dock__icon {
  transform: translateY(-5px) scale(1.18);
  margin: 0 4px;
}

How to use macOS Dock

Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.

Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.

More sidebars & docks components

← Browse all NudaUI components