Skip to content

Scale Dropdown

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

Dropdowns & MenusHTMLCSSany framework
  • Duplicate
  • Archive
  • Delete

Copy into your project

HTML
<div class="nuda-dds">
  <button class="nuda-dds__trigger">Options ▾</button>
  <ul class="nuda-dds__menu">
    <li class="nuda-dds__item">Duplicate</li>
    <li class="nuda-dds__item">Archive</li>
    <li class="nuda-dds__item">Delete</li>
  </ul>
</div>
CSS
.nuda-dds {
  position: relative;
  display: inline-block;
}

.nuda-dds__trigger {
  background: #1a1a1a;
  color: #fafafa;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: .5rem .9rem;
  font-size: .8rem;
  cursor: pointer;
}

.nuda-dds__menu {
  list-style: none;
  margin: .4rem 0 0;
  padding: .35rem;
  min-width: 150px;
  background: #141414;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  transform-origin: top center;
  animation: _ddsIn .22s cubic-bezier(.34,1.56,.64,1);
}

.nuda-dds__item {
  padding: .5rem .6rem;
  border-radius: 6px;
  font-size: .8rem;
  color: #cfcfcf;
  cursor: pointer;
}

.nuda-dds__item:hover {
  background: rgba(228,255,84,.1);
  color: #fafafa;
}

@keyframes _ddsIn {
  from {
    opacity: 0;
    transform: scale(.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-dds__menu {
    animation: none;
  }
}

How to use Scale Dropdown

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