Pill Tab Bar
A copy-paste navigation component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
NavigationHTMLCSSany framework
Copy into your project
HTML
<div class="nuda-navx-pill-bar" role="tablist" aria-label="Page sections">
<button class="nuda-navx-pill-bar__tab nuda-navx-pill-bar__tab--active" role="tab" aria-selected="true">
<span class="nuda-navx-pill-bar__dot"></span>
Explore
</button>
<button class="nuda-navx-pill-bar__tab" role="tab" aria-selected="false">Trending</button>
<button class="nuda-navx-pill-bar__tab" role="tab" aria-selected="false">Saved</button>
<button class="nuda-navx-pill-bar__tab" role="tab" aria-selected="false">Profile</button>
</div>CSS
.nuda-navx-pill-bar {
display: inline-flex;
gap: 4px;
background: #1a1a1a;
border: 1px solid rgba(255,255,255,.1);
border-radius: 14px;
padding: 5px;
animation: _nuda-navxpillbar-in .35s ease-out;
}
.nuda-navx-pill-bar__tab {
display: flex;
align-items: center;
gap: 6px;
background: none;
border: none;
color: #777;
font-size: .8rem;
font-weight: 500;
padding: .45rem 1rem;
border-radius: 10px;
cursor: pointer;
transition: color .2s,background .2s;
white-space: nowrap;
}
.nuda-navx-pill-bar__tab:hover {
color: #cfcfcf;
background: rgba(255,255,255,.05);
}
.nuda-navx-pill-bar__tab--active {
background: #e4ff54;
color: #0a0a0a;
font-weight: 700;
}
.nuda-navx-pill-bar__tab--active:hover {
background: #d8f240;
color: #0a0a0a;
}
.nuda-navx-pill-bar__dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: #0a0a0a;
flex-shrink: 0;
}
@keyframes _nuda-navxpillbar-in {
from {
opacity: 0;
transform: translateY(6px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-navx-pill-bar {
animation: none;
}
.nuda-navx-pill-bar__tab {
transition: none;
}
}
How to use Pill Tab Bar
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.