Skip to content

Barber Stripes

Progress · Stripes · playful, warm

Customize

HTML

<div class="utw-loader-barber-stripes" role="status">
  <span class="utw-loader-barber-stripes__bar"></span>
  <span class="utw-loader-barber-stripes__sr">Loading…</span>
</div>

CSS

/* Progress loader (Stripes) */
.utw-loader-barber-stripes {
  box-sizing: border-box;
  position: relative;
  display: block;
  width: 300px;
  max-width: 100%;
  height: 12px;
  border-radius: 6px;
  background: #f59e0b;
  overflow: hidden;
}

.utw-loader-barber-stripes *,
.utw-loader-barber-stripes *::before,
.utw-loader-barber-stripes *::after {
  box-sizing: border-box;
}

.utw-loader-barber-stripes__bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -33.94px;
  right: 0;
  background: repeating-linear-gradient(45deg, #f59e0b 0 12px, #fcd34d 12px 24px);
  animation: utw-loader-barber-stripes-stripes 0.8s linear infinite;
}

.utw-loader-barber-stripes__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-barber-stripes-stripes {
  to {
    transform: translateX(33.94px);
  }
}

@keyframes utw-loader-barber-stripes-calm {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.5;
  }
}

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

Related loaders