Skip to content

Avatar Group

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

AvatarsHTMLCSSany framework
A
B
C
+5

Copy into your project

HTML
<div class="nuda-avatar-group">
  <img class="nuda-avatar-group__item" src="avatar1.jpg" alt="User 1" />
  <img class="nuda-avatar-group__item" src="avatar2.jpg" alt="User 2" />
  <img class="nuda-avatar-group__item" src="avatar3.jpg" alt="User 3" />
  <div class="nuda-avatar-group__more">+5</div>
</div>
CSS
/* Avatar Group
   Avatar group with +N counter and stagger animation.
   Customize: --group-size */

.nuda-avatar-group {
  display: flex;
  align-items: center;
}

.nuda-avatar-group__item {
  --group-size: 38px;
  width: var(--group-size);
  height: var(--group-size);
  border-radius: 50%;
  border: 2px solid #111;
  margin-left: -8px;
  overflow: hidden;
  object-fit: cover;
  animation: nuda-group-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.nuda-avatar-group__item:first-child {
  margin-left: 0;
}

.nuda-avatar-group__item:nth-child(2) { animation-delay: 0.06s; }
.nuda-avatar-group__item:nth-child(3) { animation-delay: 0.12s; }

.nuda-avatar-group__more {
  --group-size: 38px;
  width: var(--group-size);
  height: var(--group-size);
  border-radius: 50%;
  border: 2px solid #111;
  margin-left: -8px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 12px;
  font-weight: 600;
  animation: nuda-group-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.18s;
}

@keyframes nuda-group-pop {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nuda-avatar-group__item,
  .nuda-avatar-group__more {
    animation: none;
  }
}

How to use Avatar Group

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 avatars components

← Browse all NudaUI components