Crown Badge Avatar
A copy-paste avatars component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
AvatarsHTMLCSSany framework
E
Copy into your project
HTML
<div class="nuda-av2-crown" aria-label="Elena, VIP member">
<span class="nuda-av2-crown__avatar" style="background:linear-gradient(135deg,#a78bfa,#f472b6)">E</span>
<span class="nuda-av2-crown__badge" aria-hidden="true">
<svg viewBox="0 0 24 24"><path d="M3 8l4 3 5-6 5 6 4-3-2 10H5L3 8z" /></svg>
</span>
</div>CSS
.nuda-av2-crown {
position: relative;
display: inline-flex;
width: 52px;
height: 52px;
}
.nuda-av2-crown__avatar {
width: 100%;
height: 100%;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-weight: 700;
font-size: 15px;
border: 2px solid #09090b;
}
.nuda-av2-crown__badge {
position: absolute;
top: -10px;
left: 50%;
transform: translateX(-50%);
width: 22px;
height: 22px;
display: flex;
align-items: center;
justify-content: center;
animation: _nuda-av2crownbounce 2.6s ease-in-out infinite;
will-change: transform;
}
.nuda-av2-crown__badge svg {
width: 20px;
height: 20px;
fill: #e4ff54;
filter: drop-shadow(0 1px 2px rgba(0,0,0,.4));
}
@keyframes _nuda-av2crownbounce {
0%,100% {
transform: translateX(-50%) translateY(0) rotate(0deg);
}
50% {
transform: translateX(-50%) translateY(-3px) rotate(-4deg);
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-av2-crown__badge {
animation: none;
}
}
How to use Crown Badge 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.