Web Platform
Prefers-Reduced-Motion: Build a Calmer Interface
Implement prefers-reduced-motion with targeted CSS, progress states and interaction tests that preserve useful feedback while reducing unnecessary movement.
In this article
Prefers-Reduced-Motion: Build a Calmer Interface
A polished interface can communicate state without making every interaction move across the screen. Respecting prefers-reduced-motion helps users who request less nonessential animation. The implementation should preserve meaning and feedback while reducing movement that is decorative or disorienting.
Don't begin by deleting every transition globally. First inventory what each animation communicates. A loading indicator, a page transition and a rotating decorative illustration have different roles and need different alternatives.
Treat the preference as a product requirement
The prefers-reduced-motion documentation describes a CSS media feature that reflects a user's motion preference. It can be used to adapt styles when reduction is requested.
The preference doesn't tell you which exact effect causes discomfort for an individual. Use it to reduce nonessential motion and provide a clear baseline experience. An application's own motion setting can complement the operating-system preference when the product needs one.
Keep navigation, content and task completion available in both modes. Reduced motion is not a simplified product with fewer essential features.
Inventory motion by purpose
List animated elements and classify them: decorative, navigational, status-related or essential to understanding an interaction. Record duration, distance, looping and trigger conditions.
For a developer dashboard, the list might include an animated hero illustration, a sliding sidebar, a spinning upload indicator and a chart that moves into place. Decide what each element should do when movement is reduced.
Use a short planning object:
{
"element":"upload-progress",
"purpose":"status-feedback",
"reduced_motion_alternative":"static label and numeric progress"
}Review this inventory with JSON Viewer. The useful outcome is a deliberate alternative, not a count of animations removed.
Start with a stable baseline
Build essential content so it is understandable without animation. Add nonessential movement as an enhancement where appropriate. That makes it easier to preserve a coherent interface when the preference is active or when animation fails.
A targeted rule can remove a decorative effect:
@media (prefers-reduced-motion: reduce) {
.decorative-orbit {
animation: none;
transform: none;
}
.navigation-panel {
transition: none;
}
}Use CSS Formatter to review the rule structure. It does not test accessibility or simulate the user's operating-system setting; verify the behavior in a browser.
Preserve status feedback
If a spinner stops, users still need to know work is happening. Provide a status label, progress value where meaningful and a completion or failure state. Avoid making continuous motion the only indicator of activity.
For uploads, show which item is processing and whether the operation can be cancelled. For a long calculation, distinguish “working” from “waiting for input.” A static indicator should not look like a frozen application.
Don't invent a percentage when the operation cannot measure progress. A clear textual phase can communicate more honestly than a smoothly animated but arbitrary progress bar.
Check event-dependent code
Some applications rely on an animation-end or transition-end event to remove elements, unlock buttons or advance a workflow. If reduced motion removes the effect, that event may no longer provide the expected signal.
Move essential state transitions into application logic rather than making them depend exclusively on a visual effect. Treat animation completion as a presentation detail unless the interaction truly requires it.
Test opening and closing dialogs, route changes, notifications and menu controls with reduction active. Confirm that focus moves correctly and that hidden content doesn't remain interactive because an animation callback never ran.
Review scrolling and large transforms
Smooth scrolling, parallax and large zoom effects deserve attention because they can move much of the visual field. Provide an immediate navigation alternative or remove nonessential movement when reduction is requested.
Check anchored navigation and automatic scroll-to-result behavior. Users should still find the destination without an extended travel animation. A visible heading or focus target can establish context after the jump.
For charts, show the final data directly in reduced-motion mode. If animation explains a change, offer a static comparison or a textual explanation that preserves the same information.
Test the real preference and runtime changes
Use browser developer tools to emulate the media feature during development, then test an actual device preference when practical. Verify the supported browsers for your product rather than assuming the development browser represents every client.
If JavaScript uses matchMedia, decide whether the interface reacts when the preference changes while the page is open. Clean up event listeners and keep the server-rendered baseline sensible before client-side preference detection runs.
Use Text Diff to review the targeted CSS and logic changes. Keep the review focused on affected components instead of adding an indiscriminate global override that conceals dependencies.
Add meaningful interaction checks
Test that a menu can open and close, a dialog can be dismissed, progress completes and a route displays its final content in both modes. Include keyboard navigation and focus behavior.
Avoid a test that only checks whether the media query exists. The user-visible behavior matters: less unnecessary movement, preserved state feedback and no broken interaction path.
Document the motion alternatives in the component guidelines so new components follow the same policy. An interface can regress when a new library adds animation defaults outside your existing CSS selectors.
Conclusion
Respect reduced motion by identifying each effect's purpose and providing a stable alternative. Remove decorative movement, preserve honest progress feedback and keep application state independent of animation events. A calmer interface should remain complete, responsive and easy to understand.