rive-app / rive-react

React runtime for Rive
https://rive-app.github.io/rive-react
MIT License
808 stars 32 forks source link

prefers-reduced-motion props #152

Open flavienbonvin opened 1 year ago

flavienbonvin commented 1 year ago

Currently, animations are played regardless of the prefers-reduced-motion preferences. This can be an issue when working on accessibility.

Having a prop on the useRive hook that would control how the animation behaves when prefers-reduced-motion is true would be great. Besides, it could be great to define a frame or a fallback image when prefers-reduced-motion is true. This way it would be possible to display the first or last image or have a fallback image instead.