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

React - support for css styling #359

Closed
1 of 4 tasks
VogelDevelopment opened this issue Sep 24, 2024 · 1 comment
Closed
1 of 4 tasks

React - support for css styling #359

VogelDevelopment opened this issue Sep 24, 2024 · 1 comment
Labels
question Further information is requested

Comments

@VogelDevelopment
Copy link

VogelDevelopment commented Sep 24, 2024

Overview

In the @lottiefiles/dotlottie-react library we are forced to use canvas. I've set up my animations and css to dynamically change the styling of my animations (through after effects css class-support). The new library "@lottiefiles/dotlottie-react" doesn't support that functionality, thus I'm currently forced to continue working with "@dotlottie/react-player", where it works just fine, but is deprecated.
Would be nice to have css-styling support with the new renderer as well (or the ability to use the old method).

Type

  • New feature
  • Changes to existing features
    • Support css styling for the forced canvas renderer or enable support for legacy renderers which support css styling

Motivation

I've set up my animations and css to dynamically change the styling of my animations (through after effects css class-support). The new library "@lottiefiles/dotlottie-react" doesn't support that functionality, thus I'm currently forced to continue working with "@dotlottie/react-player", where it works just fine, but is deprecated.
Having meaningful animations is cool, being able to adjust them based on your style, or user preferences (or even just light/dark-mode) is essential for some applications.

...

Labels

  • Add the Type: Feature Request label to this issue.
  • Add the React label to this issue.
@theashraf
Copy link
Member

@fragkingler I don't think it's possible to dynamically theme the animation using CSS since dotLottie-web renders on a canvas. However, you may want to check out the dotLottie theming feature, which allows you to change the animation colors dynamically at runtime.

You can find an overview of dotLottie theming here: https://developers.lottiefiles.com/docs/tools/dotlottie-js/theming/

@theashraf theashraf added the question Further information is requested label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants