1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Use the `prefers-reduced-motion` media query to toggle CSS and JavaScript animations

    reactReact

    In this lesson we focus on toggling animations on and off using the prefers-reduced-motion media query. The sample web app has 3 types of animations (CSS, SVG SMIL, and JavaScript) and we will toggle these animations using different techniques such as @media, matchMedia, and a custom hook.