Typing Avatar
A copy-paste avatars component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
AvatarsHTMLCSSany framework
J
Copy into your project
HTML
<div class="nuda-av2-typing" aria-label="Jordan is typing">
<span class="nuda-av2-typing__avatar" style="background:linear-gradient(135deg,#22d3ee,#6366f1)">J</span>
<span class="nuda-av2-typing__bubble" aria-hidden="true">
<span class="nuda-av2-typing__dot"></span>
<span class="nuda-av2-typing__dot"></span>
<span class="nuda-av2-typing__dot"></span>
</span>
</div>CSS
.nuda-av2-typing {
position: relative;
display: inline-flex;
width: 52px;
height: 52px;
}
.nuda-av2-typing__avatar {
width: 100%;
height: 100%;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-weight: 700;
font-size: 15px;
}
.nuda-av2-typing__bubble {
position: absolute;
right: -6px;
bottom: -4px;
display: flex;
align-items: center;
gap: 2px;
background: #161616;
border: 1px solid rgba(255,255,255,.12);
border-radius: 10px;
padding: 4px 6px;
}
.nuda-av2-typing__dot {
width: 4px;
height: 4px;
border-radius: 50%;
background: #e4ff54;
animation: _nuda-av2typingbounce 1.2s ease-in-out infinite;
will-change: transform,opacity;
}
.nuda-av2-typing__dot:nth-child(2) {
animation-delay: .15s;
}
.nuda-av2-typing__dot:nth-child(3) {
animation-delay: .3s;
}
@keyframes _nuda-av2typingbounce {
0%,60%,100% {
transform: translateY(0);
opacity: .5;
}
30% {
transform: translateY(-3px);
opacity: 1;
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-av2-typing__dot {
animation: none;
transform: translateY(0);
opacity: 1;
}
}
How to use Typing 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.