Seven hexagons pop into a honeycomb one cell at a time around the ring, then shrink away in the same order. Cells are clip-path hexagons with a back-out ease on the pop.
Also known as: hexagon loader, honeycomb loader, hexagon grid spinner.
<div class="ldr-hexagon-honeycomb" role="status" aria-label="Loading"> <span style="--x: -0.5; --y: -1; --i: 0"></span> <span style="--x: 0.5; --y: -1; --i: 1"></span> <span style="--x: 1; --y: 0; --i: 2"></span> <span style="--x: 0.5; --y: 1; --i: 3"></span> <span style="--x: -0.5; --y: 1; --i: 4"></span> <span style="--x: -1; --y: 0; --i: 5"></span> <span style="--x: 0; --y: 0; --i: 6"></span> </div>
.ldr-hexagon-honeycomb {
--s: var(--ldr-size, 48px);
--c: var(--ldr-color, #3b82f6);
--w: calc(var(--s) * 0.36);
--h: calc(var(--w) * 1.1547);
position: relative;
width: calc(var(--w) * 3);
height: calc(var(--h) * 2.5);
}
.ldr-hexagon-honeycomb span {
position: absolute;
left: calc(50% + var(--x) * var(--w) - var(--w) / 2);
top: calc(50% + var(--y) * var(--h) * 0.75 - var(--h) / 2);
width: var(--w);
height: var(--h);
background: var(--c);
clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
animation: ldr-hexagon-honeycomb-pop 2.1s infinite both;
animation-delay: calc(var(--i) * 0.1s);
}
.ldr-hexagon-honeycomb span:last-child {
background: color-mix(in srgb, var(--c) 70%, #000);
}
@keyframes ldr-hexagon-honeycomb-pop {
0% { transform: scale(0); animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
14% { transform: scale(0.9); }
50% { transform: scale(0.9); animation-timing-function: cubic-bezier(0.36, 0, 0.66, -0.56); }
64%, 100% { transform: scale(0); }
}
@media (prefers-reduced-motion: reduce) {
.ldr-hexagon-honeycomb, .ldr-hexagon-honeycomb *, .ldr-hexagon-honeycomb::before, .ldr-hexagon-honeycomb::after, .ldr-hexagon-honeycomb *::before, .ldr-hexagon-honeycomb *::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.