Skip to content

Pill Nav

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

NavigationHTMLCSSany framework

Copy into your project

HTML
<nav class="nuda-pill-nav" aria-label="Section navigation">
  <a class="nuda-pill-nav__link active" href="#" aria-current="page">Dashboard</a>
  <a class="nuda-pill-nav__link" href="#">Analytics</a>
  <a class="nuda-pill-nav__link" href="#">Settings</a>
</nav>
CSS
/* Pill Nav
   Navigation with sliding pill background on active item.
   Customize: --pill-accent, --pill-bg, --pill-text */

.nuda-pill-nav {
  --pill-accent: #e4ff54;
  --pill-bg: rgba(255, 255, 255, 0.06);
  --pill-text: #999;
  display: flex;
  gap: 4px;
  background: var(--pill-bg);
  border-radius: 12px;
  padding: 4px;
}

.nuda-pill-nav__link {
  color: var(--pill-text);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.nuda-pill-nav__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nuda-pill-nav__link.active {
  color: #0a0a0a;
  background: var(--pill-accent);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .nuda-pill-nav__link {
    transition: none;
  }
}

How to use Pill Nav

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 navigation components

← Browse all NudaUI components