Last updated
Accessibility for Loading Animations
/* Always respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
.spinner,
.dots-loader span,
.progress-bar::before,
.progress-bar::after,
.skeleton {
animation: none;
}
/* Provide a static alternative */
.skeleton {
background: #f0f0f0;
}
}
/* Screen reader announcement for loading state */
<div role="status" aria-live="polite" aria-label="Loading...">
<div class="spinner" aria-hidden="true"></div>
</div>
Loader Types Reference
- Spinner: best for short, indeterminate waits (button clicks, form submissions)
- Progress bar: best for longer operations where progress can be measured
- Skeleton: best for content loading (feeds, cards, lists) — reduces perceived wait time
- Dots: friendly, playful — good for chat apps and casual interfaces
- Pulse: subtle — good for status indicators and background processes
The CSS Loader Generator on TechConverter.me creates accessible, performant loading animations with complete HTML and CSS output. Choose your loader style, customize colors and size, and copy the code directly into your project.
Examples
Example 1: Classic Spinning Circle
@keyframes spin {
to { transform: rotate(360deg); }
}
.spinner {
width: 40px;
height: 40px;
border: 4px solid #e5e7eb;
border-top-color: #2563eb;
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
/* Small variant */
.spinner-sm {
width: 20px;
height: 20px;
border-width: 2px;
}
/* Large variant */
.spinner-lg {
width: 64px;
height: 64px;
border-width: 6px;
}
/* Colored variants */
.spinner-success { border-top-color: #059669; }
.spinner-danger { border-top-color: #dc2626; }
Example 2: Dual Ring Spinner
@keyframes dualSpin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.dual-ring {
display: inline-block;
width: 48px;
height: 48px;
}
.dual-ring::after {
content: '';
display: block;
width: 40px;
height: 40px;
margin: 4px;
border-radius: 50%;
border: 4px solid transparent;
border-color: #2563eb transparent #2563eb transparent;
animation: dualSpin 1.2s linear infinite;
}
Example 3: Bouncing Dots
@keyframes bounce {
0%, 80%, 100% { transform: scale(0); }
40% { transform: scale(1); }
}
.dots-loader {
display: flex;
gap: 6px;
align-items: center;
}
.dots-loader span {
width: 10px;
height: 10px;
background-color: #2563eb;
border-radius: 50%;
animation: bounce 1.4s ease-in-out infinite both;
}
.dots-loader span:nth-child(1) { animation-delay: -0.32s; }
.dots-loader span:nth-child(2) { animation-delay: -0.16s; }
.dots-loader span:nth-child(3) { animation-delay: 0s; }