Skip to content

Search Dropdown

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

Dropdowns & MenusHTMLCSSany framework
  • React
  • Svelte
  • Vue

Copy into your project

HTML
<div class="nuda-dsr">
  <input class="nuda-dsr__input" placeholder="Search…" />
  <ul class="nuda-dsr__list">
    <li class="nuda-dsr__item">React</li>
    <li class="nuda-dsr__item">Svelte</li>
    <li class="nuda-dsr__item">Vue</li>
  </ul>
</div>
CSS
.nuda-dsr {
  min-width: 200px;
  background: #141414;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  overflow: hidden;
  animation: _dsrIn .2s ease-out;
}

.nuda-dsr__input {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: .6rem .7rem;
  font-size: .8rem;
  color: #fafafa;
  outline: none;
}

.nuda-dsr__input::placeholder {
  color: #666;
}

.nuda-dsr__list {
  list-style: none;
  margin: 0;
  padding: .35rem;
}

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

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

@keyframes _dsrIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

How to use Search 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