Skip to content

Stretching Arc

Ring · Stretching arc · material, smooth

Customize

HTML

<div class="utw-loader-stretching-arc" role="status">
  <svg class="utw-loader-stretching-arc__svg" viewBox="0 0 50 50" aria-hidden="true"><circle class="utw-loader-stretching-arc__track" cx="25" cy="25" r="22.42"/><circle class="utw-loader-stretching-arc__arc" cx="25" cy="25" r="22.42"/></svg>
  <span class="utw-loader-stretching-arc__sr">Loading…</span>
</div>

CSS

/* Ring loader (Stretching arc) */
.utw-loader-stretching-arc {
  box-sizing: border-box;
  position: relative;
  display: inline-block;
  width: 48px;
  height: 48px;
}

.utw-loader-stretching-arc *,
.utw-loader-stretching-arc *::before,
.utw-loader-stretching-arc *::after {
  box-sizing: border-box;
}

.utw-loader-stretching-arc__svg {
  display: block;
  width: 100%;
  height: 100%;
  animation: utw-loader-stretching-arc-spin 2.24s linear infinite;
}

.utw-loader-stretching-arc__svg circle {
  fill: none;
  stroke-width: 4.17;
}

.utw-loader-stretching-arc__track {
  stroke: #dbeafe;
}

.utw-loader-stretching-arc__arc {
  stroke: #2563eb;
  stroke-linecap: round;
  stroke-dasharray: 1 140.85;
  animation: utw-loader-stretching-arc-dash 1.4s ease-in-out infinite;
}

.utw-loader-stretching-arc__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-stretching-arc-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes utw-loader-stretching-arc-dash {
  0% {
    stroke-dasharray: 1 140.85;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 98.59 140.85;
    stroke-dashoffset: -21.13;
  }
  100% {
    stroke-dasharray: 98.59 140.85;
    stroke-dashoffset: -138.03;
  }
}

@keyframes utw-loader-stretching-arc-calm {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.5;
  }
}

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

Related loaders