Skip to content

Mentions Chip

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

Comments & ReactionsHTMLCSSany framework

Thanks aria for the catch — I'll ping kai now.

Copy into your project

HTML
<p class="nuda-mentions">
  Thanks
  <a href="#" class="nuda-mentions__chip">
    <span class="nuda-mentions__at" aria-hidden="true">@</span>aria
  </a>
  for the catch — I'll ping
  <a href="#" class="nuda-mentions__chip">
    <span class="nuda-mentions__at" aria-hidden="true">@</span>kai
  </a>
  now.
</p>
CSS
/* Mentions Chip
   @username highlight that lifts on hover.
   Customize: --mc-color, --mc-tint */

.nuda-mentions {
  color: #a0a0a8;
  font-size: 13px;
  line-height: 1.6;
  max-width: 420px;
  margin: 0;
}

.nuda-mentions__chip {
  --mc-color: #62b6ff;
  --mc-tint: rgba(98, 182, 255, 0.1);
  display: inline-flex;
  align-items: center;
  color: var(--mc-color);
  background: var(--mc-tint);
  padding: 1px 8px 1px 6px;
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  font-size: 12px;
  transition:
    background 0.25s,
    color 0.25s,
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.nuda-mentions__chip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(98, 182, 255, 0.15);
  transform: scale(0.6);
  opacity: 0;
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.25s;
}

.nuda-mentions__at {
  opacity: 0.7;
  margin-right: 1px;
  font-weight: 600;
}

.nuda-mentions__chip:hover {
  color: #fafafa;
  background: rgba(98, 182, 255, 0.2);
  transform: translateY(-1px);
}

.nuda-mentions__chip:hover::before {
  transform: scale(1);
  opacity: 1;
}

.nuda-mentions__chip:focus-visible {
  outline: 2px solid var(--mc-color);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .nuda-mentions__chip,
  .nuda-mentions__chip::before {
    transition: none;
    transform: none;
  }
}

How to use Mentions Chip

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