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

Elijah Manor
InstructorElijah Manor

Share this video with your friends

Send Tweet

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.