Notification Bubble Avatar
A copy-paste avatars component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
AvatarsHTMLCSSany framework
P
Copy into your project
HTML
<div class="nuda-av2-notify" aria-label="Priya, 4 unread notifications">
<span class="nuda-av2-notify__avatar" style="background:linear-gradient(135deg,#34d399,#06b6d4)">P</span>
<span class="nuda-av2-notify__badge" aria-hidden="true">4</span>
</div>CSS
.nuda-av2-notify {
position: relative;
display: inline-flex;
width: 52px;
height: 52px;
}
.nuda-av2-notify__avatar {
width: 100%;
height: 100%;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #062b22;
font-weight: 700;
font-size: 15px;
}
.nuda-av2-notify__badge {
position: absolute;
top: -4px;
right: -4px;
min-width: 18px;
height: 18px;
padding: 0 4px;
border-radius: 9px;
background: #ef4444;
color: #fff;
font-size: 10px;
font-weight: 800;
display: flex;
align-items: center;
justify-content: center;
border: 2px solid #09090b;
animation: _nuda-av2notifypop .5s cubic-bezier(.34,1.56,.64,1) both;
will-change: transform;
}
@keyframes _nuda-av2notifypop {
0% {
transform: scale(0);
}
70% {
transform: scale(1.2);
}
100% {
transform: scale(1);
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-av2-notify__badge {
animation: none;
transform: scale(1);
}
}
How to use Notification Bubble Avatar
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.