Skip to content

Mention Toast

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

Toasts & AlertsHTMLCSSany framework
AL

Ana Lima mentioned you

in #design-review: “great work on this!”

Copy into your project

HTML
<div class="nuda-ta2-mention" role="status" aria-live="polite">
  <span class="nuda-ta2-mention__avatar">
    AL
    <span class="nuda-ta2-mention__badge" aria-hidden="true">@</span>
  </span>
  <div class="nuda-ta2-mention__body">
    <p class="nuda-ta2-mention__title"><strong>Ana Lima</strong> mentioned you</p>
    <p class="nuda-ta2-mention__desc">in #design-review: &ldquo;great work on this!&rdquo;</p>
  </div>
</div>
CSS
.nuda-ta2-mention {
  --c: #e4ff54;
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  background: #161616;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: .75rem .9rem;
  min-width: 270px;
  max-width: 320px;
  animation: _nuda-ta2mentionin .4s ease-out both;
}

.nuda-ta2-mention__avatar {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg,#9d6dff,#ff6dd4);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
}

.nuda-ta2-mention__badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--c);
  color: #0a0a0a;
  font-size: .6rem;
  font-weight: 800;
  border: 2px solid #161616;
  animation: _nuda-ta2mentionpulse 2s ease-in-out infinite;
}

.nuda-ta2-mention__body {
  min-width: 0;
}

.nuda-ta2-mention__title {
  color: #fafafa;
  font-size: .82rem;
  margin: 0;
}

.nuda-ta2-mention__title strong {
  font-weight: 700;
}

.nuda-ta2-mention__desc {
  color: #8a8a8a;
  font-size: .72rem;
  margin: .2rem 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes _nuda-ta2mentionin {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes _nuda-ta2mentionpulse {
  0%,100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
}

@media (prefers-reduced-motion:reduce) {
  .nuda-ta2-mention {
    animation: none;
  }
  .nuda-ta2-mention__badge {
    animation: none;
  }
}

How to use Mention Toast

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 toasts & alerts components

← Browse all NudaUI components