Skip to content

Live Counter

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

Stats & CountersHTMLCSSany framework
1,247online

Copy into your project

HTML
<!-- Live Counter -->
<div class="nuda-live">
  <span class="nuda-live__dot"></span>
  <span class="nuda-live__count">1,247</span>
  <span class="nuda-live__label">online</span>
</div>
CSS
/* Live Counter
   Pulsing live dot beside an online-users count.
   Customize: --live-color, --live-bg */

.nuda-live {
  --live-color: #e4ff54;
  --live-bg: rgba(228, 255, 84, 0.06);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  background: var(--live-bg);
  border: 1px solid rgba(228, 255, 84, 0.15);
  border-radius: 999px;
}

.nuda-live__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live-color);
  box-shadow: 0 0 8px var(--live-color);
}

.nuda-live__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--live-color);
  animation: nuda-live-pulse 1.6s ease-out infinite;
}

.nuda-live__count {
  font: 700 0.875rem ui-sans-serif, system-ui, sans-serif;
  color: #fafafa;
  font-variant-numeric: tabular-nums;
}

.nuda-live__label {
  font: 600 0.625rem ui-sans-serif, system-ui, sans-serif;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@keyframes nuda-live-pulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(2.8); opacity: 0;   }
}

@media (prefers-reduced-motion: reduce) {
  .nuda-live__dot::after { animation: none; opacity: 0; }
}

How to use Live Counter

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 stats & counters components

← Browse all NudaUI components