Skip to content

Share Count Buttons

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

Social ShareHTMLCSSany framework

Copy into your project

HTML
<div class="nuda-shr-count">
  <button class="nuda-shr-count__btn">
    <svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.744l7.737-8.835L1.254 2.25H8.08l4.26 5.632zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>
    <span class="nuda-shr-count__num">2.4k</span>
  </button>
  <button class="nuda-shr-count__btn nuda-shr-count__btn--fb">
    <svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/></svg>
    <span class="nuda-shr-count__num">1.1k</span>
  </button>
  <button class="nuda-shr-count__btn nuda-shr-count__btn--li">
    <svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/></svg>
    <span class="nuda-shr-count__num">847</span>
  </button>
</div>
CSS
.nuda-shr-count {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.nuda-shr-count__btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .7rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: #1a1a1a;
  color: #cfcfcf;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
  transition: border-color .15s,background .15s;
}

.nuda-shr-count__btn:hover {
  background: #222;
  border-color: rgba(255,255,255,.25);
}

.nuda-shr-count__btn--fb {
  color: #4a90d9;
}

.nuda-shr-count__btn--li {
  color: #5ba4cf;
}

.nuda-shr-count__num {
  color: #777;
  font-weight: 400;
}

How to use Share Count Buttons

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 social share components

← Browse all NudaUI components