Skip to content

Toolbar Overflow Menu

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

Dropdowns & MenusHTMLCSSany framework

Copy into your project

HTML
<div class="nuda-dm2-overflow">
  <button class="nuda-dm2-overflow__trigger" type="button" aria-haspopup="menu" aria-expanded="true" aria-label="More actions">⋯</button>
  <div class="nuda-dm2-overflow__menu" role="menu" aria-label="More actions">
    <button class="nuda-dm2-overflow__item" type="button" role="menuitem">Share</button>
    <button class="nuda-dm2-overflow__item" type="button" role="menuitem">Print</button>
    <button class="nuda-dm2-overflow__item" type="button" role="menuitem">Archive</button>
  </div>
</div>
CSS
.nuda-dm2-overflow {
  position: relative;
  display: inline-block;
  font-family: inherit;
  transform-origin: top right;
}

.nuda-dm2-overflow__trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  box-sizing: border-box;
  background: #1a1a1a;
  color: #fafafa;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.nuda-dm2-overflow__trigger:focus-visible {
  outline: 2px solid #e4ff54;
  outline-offset: 2px;
}

.nuda-dm2-overflow__menu {
  position: absolute;
  right: 0;
  margin: .4rem 0 0;
  padding: .35rem;
  width: 160px;
  box-sizing: border-box;
  background: #141414;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  transform-origin: top right;
  animation: _nuda-dm2overflowIn .2s ease-out;
}

.nuda-dm2-overflow__item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: .5rem .65rem;
  border: 0;
  background: transparent;
  border-radius: 6px;
  font-size: .8rem;
  color: #cfcfcf;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease,color .15s ease;
}

.nuda-dm2-overflow__item:hover,.nuda-dm2-overflow__item:focus-visible {
  background: rgba(255,255,255,.06);
  color: #fafafa;
}

.nuda-dm2-overflow__item:focus-visible {
  outline: 2px solid #e4ff54;
  outline-offset: -2px;
}

@keyframes _nuda-dm2overflowIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-dm2-overflow__menu {
    animation: none !important;
  }
}

How to use Toolbar Overflow Menu

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 dropdowns & menus components

← Browse all NudaUI components