Skip to content

Pulse 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-pulse-avatar">
  <div class="nuda-pulse-avatar__ring"></div>
  <img class="nuda-pulse-avatar__img" src="avatar.jpg" alt="User name" />
</div>
CSS
/* Pulse Avatar
   Avatar with breathing pulse ring.
   Customize: --pulse-size, --pulse-color */

.nuda-pulse-avatar {
  --pulse-size: 48px;
  --pulse-color: #8b5cf6;
  position: relative;
  width: var(--pulse-size);
  height: var(--pulse-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nuda-pulse-avatar__ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--pulse-color);
  animation: nuda-avatar-breathe 2s ease-in-out infinite;
  will-change: transform, opacity;
}

.nuda-pulse-avatar__img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

@keyframes nuda-avatar-breathe {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.12);
    opacity: 0.2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nuda-pulse-avatar__ring { animation: none; }
}

How to use Pulse 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.

More avatars components

← Browse all NudaUI components