AI CSS Animations

Stacked Layers Loader

Three isometric plates stacked like a layers icon lift in a wave from the bottom up, the top one highest, so the stack fans open and settles. Plate edges are a drop-shadow on a clip-path diamond.

Also known as: isometric layers loader, stack loader, layers icon animation.

HTML

<div class="ldr-isometric-layers" role="status" aria-label="Loading">
  <span style="--i: 0; --y: 1; --a: 0.6"></span><span style="--i: 1; --y: 0; --a: 1"></span><span style="--i: 2; --y: -1; --a: 1.5"></span>
</div>

CSS

.ldr-isometric-layers {
  --s: var(--ldr-size, 48px);
  --c: var(--ldr-color, #3b82f6);
  position: relative;
  width: var(--s);
  height: var(--s);
}
.ldr-isometric-layers span {
  --f: var(--c);
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--s) * 0.92);
  height: calc(var(--s) * 0.46);
  margin: calc(var(--s) * -0.23) 0 0 calc(var(--s) * -0.46);
  translate: 0 calc(var(--y) * var(--s) * 0.2);
  filter: drop-shadow(0 calc(var(--s) / 16) 0 color-mix(in srgb, var(--f) 62%, #000));
  animation: ldr-isometric-layers-lift 1.8s cubic-bezier(0.45, 0, 0.55, 1) infinite both;
  animation-delay: calc(var(--i) * 0.14s);
}
.ldr-isometric-layers span::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--f);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.ldr-isometric-layers span:nth-child(1) { --f: color-mix(in srgb, var(--c) 45%, #fff); }
.ldr-isometric-layers span:nth-child(2) { --f: color-mix(in srgb, var(--c) 72%, #fff); }
@keyframes ldr-isometric-layers-lift {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(calc(var(--s) * -0.12 * var(--a))); }
}

@media (prefers-reduced-motion: reduce) {
  .ldr-isometric-layers, .ldr-isometric-layers *, .ldr-isometric-layers::before, .ldr-isometric-layers::after, .ldr-isometric-layers *::before, .ldr-isometric-layers *::after {
    animation-duration: 3s;
  }
}

Customizing this loader

  • Color: set --ldr-color on the element or a parent. Currently previewing #3b82f6.
  • Size: set --ldr-size. Every dimension in the snippet is derived from it. Currently previewing 64px.
  • Speed: change the duration on the animation shorthand. Delays on the children are relative, so they keep their rhythm.
  • Accessibility: the root carries role="status" and an aria-label so screen readers announce the wait. The reduced-motion rule at the end slows the animation for users who asked for less motion.

Similar loaders