Skip to content

Emoji Hover Preview Tooltip

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

Comments & ReactionsHTMLCSSany framework
:party-popper::rocket::sparkles:

Copy into your project

HTML
<div class="nuda-emoji-tip-row">
  <span class="nuda-emoji-tip">
    <button type="button" class="nuda-emoji-tip__btn" aria-describedby="tip-1">
      <span aria-hidden="true">🎉</span>
    </button>
    <span class="nuda-emoji-tip__pop" id="tip-1" role="tooltip">
      <span class="nuda-emoji-tip__big" aria-hidden="true">🎉</span>
      <span class="nuda-emoji-tip__name">:party-popper:</span>
    </span>
  </span>
  <span class="nuda-emoji-tip">
    <button type="button" class="nuda-emoji-tip__btn" aria-describedby="tip-2">
      <span aria-hidden="true">🚀</span>
    </button>
    <span class="nuda-emoji-tip__pop" id="tip-2" role="tooltip">
      <span class="nuda-emoji-tip__big" aria-hidden="true">🚀</span>
      <span class="nuda-emoji-tip__name">:rocket:</span>
    </span>
  </span>
  <span class="nuda-emoji-tip">
    <button type="button" class="nuda-emoji-tip__btn" aria-describedby="tip-3">
      <span aria-hidden="true">✨</span>
    </button>
    <span class="nuda-emoji-tip__pop" id="tip-3" role="tooltip">
      <span class="nuda-emoji-tip__big" aria-hidden="true">✨</span>
      <span class="nuda-emoji-tip__name">:sparkles:</span>
    </span>
  </span>
</div>
CSS
/* Emoji Hover Preview Tooltip
   Hover or focus an emoji button to reveal a large preview + shortcode. */

.nuda-emoji-tip-row {
  display: inline-flex;
  gap: 8px;
  padding: 8px;
  background: #0c0c10;
  border: 1px solid #1c1c22;
  border-radius: 999px;
}

.nuda-emoji-tip {
  position: relative;
  display: inline-block;
}

.nuda-emoji-tip__btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}

.nuda-emoji-tip__btn:hover {
  background: #1c1c22;
  transform: translateY(-2px);
}

.nuda-emoji-tip__btn:focus-visible {
  outline: 2px solid #e4ff54;
  outline-offset: 2px;
}

.nuda-emoji-tip__pop {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px) scale(0.85);
  transform-origin: bottom center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  background: #111114;
  border: 1px solid #1c1c22;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s,
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.nuda-emoji-tip__pop::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1c1c22;
}

.nuda-emoji-tip__big { font-size: 36px; line-height: 1; }
.nuda-emoji-tip__name {
  color: #a0a0a8;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 11px;
}

.nuda-emoji-tip:hover .nuda-emoji-tip__pop,
.nuda-emoji-tip:focus-within .nuda-emoji-tip__pop {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .nuda-emoji-tip__btn,
  .nuda-emoji-tip__pop { transition: none; }
  .nuda-emoji-tip__btn:hover { transform: none; }
  .nuda-emoji-tip:hover .nuda-emoji-tip__pop,
  .nuda-emoji-tip:focus-within .nuda-emoji-tip__pop {
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

How to use Emoji Hover Preview Tooltip

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