Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Please allow reducedMotion from <MotionConfig> to be used in animate() #2593

Open
claudiocalautti opened this issue Mar 25, 2024 · 0 comments
Labels
feature New feature or request

Comments

@claudiocalautti
Copy link

Is your feature request related to a problem? Please describe.

I'm using animate() to manually animate some text nodes in a React component.

I use "Reduce Motion" in the mac settings at all time to avoid sliding between fullscreen(s).

I've wrapped my app with a global <MotionConfig reducedMotion="never">.

However, this setting is not pulled when using animate() manually.

Describe the solution you'd like

I can see there is a TODO comment pending in the VisualElement.ts source: https://github.com/framer/motion/blob/2b270d0dbbec8b0aabaecae9929d33202ae9f8ca/packages/framer-motion/src/render/VisualElement.ts#L243C8-L244C38

Would it be possible to pass the global reduced motion config? As the comment says "feels like it could be set globally", this seems a compelling case for making such change.

Describe alternatives you've considered

There should be a way to manually handle the reduced motion capabilities of framer at all instances, currently animate() alone doesn't seem to offer such option as it skips completely the transform animations (if the mac reduced motion settings are enabled), in alternative or optionally (for when used outside react) a direct config should also be allowed into animate()'s own options.

@claudiocalautti claudiocalautti added the feature New feature or request label Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant