Twelve faint dots around a circle light up one by one with a little pop until the ring is full, then go dark in the same order. A countdown feel that suits timed waits and retries.
Also known as: dots appearing in a circle, dot clock loader, filling dots ring.
<div class="ldr-dot-circle-fill" role="status" aria-label="Loading"> <span style="--i:0"></span><span style="--i:1"></span><span style="--i:2"></span><span style="--i:3"></span> <span style="--i:4"></span><span style="--i:5"></span><span style="--i:6"></span><span style="--i:7"></span> <span style="--i:8"></span><span style="--i:9"></span><span style="--i:10"></span><span style="--i:11"></span> </div>
.ldr-dot-circle-fill {
--s: var(--ldr-size, 48px);
--c: var(--ldr-color, #3b82f6);
--d: calc(var(--s) / 6.5);
position: relative;
width: var(--s);
height: var(--s);
}
.ldr-dot-circle-fill span {
position: absolute;
inset: 0;
transform: rotate(calc(var(--i) * 30deg));
}
.ldr-dot-circle-fill span::before,
.ldr-dot-circle-fill span::after {
content: "";
position: absolute;
top: 0;
left: calc(50% - var(--d) / 2);
width: var(--d);
height: var(--d);
border-radius: 50%;
}
.ldr-dot-circle-fill span::before {
background: color-mix(in srgb, var(--ldr-color, #3b82f6) 22%, transparent);
}
.ldr-dot-circle-fill span::after {
background: var(--c);
transform: scale(0);
animation: ldr-dot-circle-fill-pop 2.4s infinite;
animation-delay: calc(var(--i) * 0.1s - 2.4s);
}
@keyframes ldr-dot-circle-fill-pop {
0% { transform: scale(0); animation-timing-function: cubic-bezier(0.3, 1.6, 0.6, 1); }
8%, 50% { transform: scale(1); animation-timing-function: cubic-bezier(0.6, 0, 0.8, 0.4); }
58%, 100% { transform: scale(0); }
}
@media (prefers-reduced-motion: reduce) {
.ldr-dot-circle-fill, .ldr-dot-circle-fill *, .ldr-dot-circle-fill::before, .ldr-dot-circle-fill::after, .ldr-dot-circle-fill *::before, .ldr-dot-circle-fill *::after {
animation-duration: 3s;
}
}--ldr-color on the element or a parent.
Currently previewing #3b82f6.--ldr-size. Every dimension in the snippet is
derived from it. Currently previewing 64px.animation shorthand.
Delays on the children are relative, so they keep their rhythm.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.