Pulsar

Fill

CSS

A hollow square with a dotted outline has its center filled by a solid smaller square that expands to the borders.

Tier
CSS
Dependencies
None
Duration
4 s, loops
Categories
Icons and micro-interactions
Use cases
Determinate progress, Success and confirmation
Industries
Security and identity, Cross-industry
Style
Minimal line · light stroke
Set
patch
Tags
scalegeometricminimalstrokeprogress

Companion assets

The same artwork, not animated. Derived from the entry’s own resting state, so it matches exactly.

Animated
CSS tier
Static vector
Fill, not animated
Download SVG

Code

animation.svg

<svg xmlns="http://www.w3.org/2000/svg" fill="none" aria-hidden="true" class="pulsar pulsar-patch-fill" data-pulsar="patch-fill" viewBox="0 0 160 96"><rect width="56" height="56" x="52" y="20" stroke="currentColor" stroke-dasharray="4 4" stroke-width="2" class="patch-fill-outline" opacity=".6" rx="6"></rect><g class="patch-fill-core"><rect width="28" height="28" x="66" y="34" fill="var(--pulsar-accent, currentColor)" fill-opacity=".2" stroke="var(--pulsar-accent, currentColor)" stroke-width="2" rx="4"></rect><circle cx="80" cy="48" r="2.5" fill="var(--pulsar-accent, currentColor)"></circle></g><rect width="56" height="56" x="52" y="20" stroke="var(--pulsar-accent, currentColor)" stroke-width="2" class="patch-fill-solid" rx="6"></rect></svg>

animation.css

.pulsar-patch-fill {
  display: block;
  overflow: visible;
}
.pulsar-patch-fill .patch-fill-core {
  transform-origin: 80px 48px;
  animation: patch-fill-core-anim 4000ms cubic-bezier(0.2, 1, 0.3, 1) infinite;
}
.pulsar-patch-fill .patch-fill-solid {
  animation: patch-fill-solid-anim 4000ms ease infinite;
}
.pulsar-patch-fill .patch-fill-outline {
  animation: patch-fill-outline-anim 4000ms ease infinite;
}

@keyframes patch-fill-core-anim {
  0%,
  15% {
    transform: scale(0.4);
    opacity: 0.3;
  }
  38% {
    transform: scale(1.6);
    opacity: 1;
  }
  80% {
    transform: scale(1.6);
    opacity: 1;
  }
  92%,
  100% {
    transform: scale(0.4);
    opacity: 0.3;
  }
}

@keyframes patch-fill-solid-anim {
  0%,
  36% {
    opacity: 0;
  }
  42%,
  80% {
    opacity: 0.85;
  }
  90%,
  100% {
    opacity: 0;
  }
}

@keyframes patch-fill-outline-anim {
  0%,
  36% {
    opacity: 0.6;
  }
  42%,
  80% {
    opacity: 0;
  }
  90%,
  100% {
    opacity: 0.6;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulsar-patch-fill * {
    animation: none !important;
  }
}

From this family15 in Patch

See the family