Lesson

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

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,...

Duration
6 min
Access
Free
Transcript
Available

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.