Skip to content

Live Beacon

Pulse · Beacon · status, small

Customize

HTML

<div class="utw-loader-live-beacon" role="status">
  <span class="utw-loader-live-beacon__halo"></span>
  <span class="utw-loader-live-beacon__core"></span>
  <span class="utw-loader-live-beacon__sr">Loading…</span>
</div>

CSS

/* Pulse loader (Beacon) */
.utw-loader-live-beacon {
  box-sizing: border-box;
  position: relative;
  display: inline-block;
  width: 40px;
  height: 40px;
}

.utw-loader-live-beacon *,
.utw-loader-live-beacon *::before,
.utw-loader-live-beacon *::after {
  box-sizing: border-box;
}

.utw-loader-live-beacon__halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #86efac;
  animation: utw-loader-live-beacon-halo 1.5s ease-out infinite;
}

.utw-loader-live-beacon__core {
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  background: #22c55e;
}

.utw-loader-live-beacon__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes utw-loader-live-beacon-halo {
  0% {
    transform: scale(0.35);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

@keyframes utw-loader-live-beacon-calm {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .utw-loader-live-beacon *,
  .utw-loader-live-beacon *::before,
  .utw-loader-live-beacon *::after {
    animation: none !important;
  }
  .utw-loader-live-beacon {
    animation: utw-loader-live-beacon-calm 2s ease-in-out infinite alternate !important;
  }
}

Related loaders