Count Badge
A copy-paste badges & tags component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Badges & TagsHTMLCSSany framework
12499+
Copy into your project
HTML
<span class="nuda-count-badge">1</span>
<span class="nuda-count-badge nuda-count-badge--accent">24</span>
<span class="nuda-count-badge nuda-count-badge--large">99+</span>CSS
/* Count Badge
Number badge with bounce-in animation.
Customize: --badge-bg, --badge-fg */
.nuda-count-badge {
--badge-bg: #ef4444;
--badge-fg: #fff;
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 22px;
height: 22px;
padding: 0 6px;
background: var(--badge-bg);
color: var(--badge-fg);
font-size: 11px;
font-weight: 700;
border-radius: 11px;
animation: nuda-count-bounce 0.5s cubic-bezier(0.36, 1.4, 0.65, 1) both;
will-change: transform;
}
.nuda-count-badge--accent {
--badge-bg: #6366f1;
}
.nuda-count-badge--large {
min-width: 30px;
height: 26px;
padding: 0 8px;
font-size: 12px;
border-radius: 13px;
}
@keyframes nuda-count-bounce {
0% { transform: scale(0) rotate(-12deg); }
60% { transform: scale(1.2) rotate(4deg); }
100% { transform: scale(1) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
.nuda-count-badge { animation: none; }
}How to use Count Badge
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.