Skip to content

Reaction Stack

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

Comments & ReactionsHTMLCSSany framework
+12

Copy into your project

HTML
<div class="nuda-reaction-stack" aria-label="6 reactions">
  <span class="nuda-reaction-stack__chip" aria-hidden="true">❤️</span>
  <span class="nuda-reaction-stack__chip" aria-hidden="true">🔥</span>
  <span class="nuda-reaction-stack__chip" aria-hidden="true">😂</span>
  <span class="nuda-reaction-stack__chip" aria-hidden="true">👍</span>
  <span class="nuda-reaction-stack__count">+12</span>
</div>
CSS
/* Reaction Stack
   Overlapping emoji "avatars" that fan out on hover. */

.nuda-reaction-stack {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px 3px 3px;
  background: #0c0c10;
  border: 1px solid #1c1c22;
  border-radius: 999px;
}

.nuda-reaction-stack__chip {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  background: #111114;
  border: 1.5px solid #0c0c10;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
  margin-left: -7px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  animation: nuda-rs-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.nuda-reaction-stack__chip:first-of-type { margin-left: 0; }

.nuda-reaction-stack:hover .nuda-reaction-stack__chip { transform: translateY(-2px); }
.nuda-reaction-stack:hover .nuda-reaction-stack__chip:nth-child(2) {
  transform: translateY(-2px) translateX(2px);
}
.nuda-reaction-stack:hover .nuda-reaction-stack__chip:nth-child(3) {
  transform: translateY(-2px) translateX(4px);
}
.nuda-reaction-stack:hover .nuda-reaction-stack__chip:nth-child(4) {
  transform: translateY(-2px) translateX(6px);
}

.nuda-reaction-stack__count {
  color: #a0a0a8;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
}

@keyframes nuda-rs-in {
  from { opacity: 0; transform: scale(0.3); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .nuda-reaction-stack__chip { animation: none; transition: none; }
  .nuda-reaction-stack:hover .nuda-reaction-stack__chip { transform: none; }
}

How to use Reaction Stack

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 comments & reactions components

← Browse all NudaUI components