body {
margin: 0;
min-height: 100vh;
display: grid;
place-items: center;
background: #0d0e12;
color: #8b8e9a;
font: 13px/1.4 system-ui, sans-serif;
}
.loaders {
--size: 44px;
--color: #e9eaee;
display: grid;
grid-template-columns: repeat(3, 130px);
gap: 12px;
}
.loaders figure {
display: grid;
place-items: center;
gap: 16px;
margin: 0;
padding: 28px 0 18px;
border: 1px solid #22242b;
border-radius: 16px;
background: #14151a;
}
.loaders figure > div {
display: flex;
align-items: center;
justify-content: center;
width: var(--size);
height: var(--size);
}
.dots {
gap: 6px;
}
.dots span {
width: 9px;
height: 9px;
border-radius: 50%;
background: var(--color);
animation: bounce 1s ease-in-out infinite;
}
.dots span:nth-child(2) { animation-delay: 0.15s; }
.dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
30% { transform: translateY(-9px); opacity: 1; }
}
.spinner {
border-radius: 50%;
background: conic-gradient(from 90deg, transparent, var(--color));
mask: radial-gradient(circle, transparent 0 calc(50% - 4px), #000 calc(50% - 3px));
animation: turn 0.9s linear infinite;
}
@keyframes turn {
to { transform: rotate(1turn); }
}
.bars {
gap: 4px;
}
.bars span {
width: 5px;
height: 100%;
border-radius: 3px;
background: var(--color);
transform-origin: bottom;
animation: rise 1s ease-in-out infinite;
}
.bars span:nth-child(2) { animation-delay: -0.75s; }
.bars span:nth-child(3) { animation-delay: -0.5s; }
.bars span:nth-child(4) { animation-delay: -0.25s; }
@keyframes rise {
0%, 100% { transform: scaleY(0.3); }
50% { transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
.loaders * {
animation-duration: 3s !important;
}
}
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}Usage
Each loader has
role="status" and a hidden label. Size and color come from --size and --color on .loaders. Under reduced motion they slow down instead of stopping, so loading is still visible.