Cross-Fades Instead of Movement
What you'll learn: How to replace motion-heavy animations with gentle opacity transitions for users who prefer reduced motion.
Why Cross-Fades Matter
When you've detected prefers-reduced-motion: reduce, users are telling you that sliding, zooming, spinning, or bouncing elements can cause discomfort or disorientation. Instead of removing animation entirely (which can make interfaces feel broken), you replace movement-based animations with opacity transitions.
Think of it like the difference between a stage curtain sliding open versus the lights gradually dimming. Both signal a change, but one involves physical movement while the other is a gentle visual shift.
The Pattern
Instead of this movement-heavy approach:
.modal {
opacity: 0;
transform: scale(0.8) translateY(-20px);
transition: opacity 0.3s, transform 0.3s;
}
.modal.visible {
opacity: 1;
transform: scale(1) translateY(0);
}
Provide a reduced-motion alternative:
@media (prefers-reduced-motion: reduce) {
.modal {
transform: none; /* Remove transforms */
transition: opacity 0.3s; /* Keep only opacity */
}
.modal.visible {
transform: none;
}
}
The element still fades in smoothly, but stays in its final position—no sliding, no scaling. The user gets visual feedback without the spatial movement.
When to Apply This
Use cross-fades as reduced-motion alternatives for:
- Modal dialogs that zoom in
- Notifications that slide from edges
- Rotating carousels
- Elements with
scale()or 3D transforms
Key Takeaway: Cross-fades (opacity-only transitions) provide accessible visual feedback for users sensitive to motion, replacing sliding, scaling, and rotating animations while maintaining interface responsiveness.