AI CSS Animations

Orbit Loader

A small planet circles a faint orbit ring. Playful without being loud, and it stays readable at very small sizes.

HTML

<div class="ldr-orbit" role="status" aria-label="Loading"></div>

CSS

.ldr-orbit {
  --s: var(--ldr-size, 48px);
  --c: var(--ldr-color, #3b82f6);
  position: relative;
  width: var(--s);
  height: var(--s);
  border: 2px solid color-mix(in srgb, var(--ldr-color, #3b82f6) 25%, transparent);
  border-radius: 50%;
  animation: ldr-orbit-spin 1.2s linear infinite;
}
.ldr-orbit::before {
  content: "";
  position: absolute;
  top: calc(var(--s) / -8);
  left: 50%;
  width: calc(var(--s) / 4);
  height: calc(var(--s) / 4);
  margin-left: calc(var(--s) / -8);
  border-radius: 50%;
  background: var(--c);
}
@keyframes ldr-orbit-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ldr-orbit, .ldr-orbit *, .ldr-orbit::before, .ldr-orbit::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