-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
How to change color icon using Lottie Animation #84
Comments
@Gamote no updates here ? |
@rafael-fecha We send the const StyledLottie = styled(Lottie)`
svg,
svg path {
fill: currentColor; // we use `currentColor` to inherit from parent
stroke: currentColor; // (or whatever colour value you want)
}
`;
const LoadingAnimation = () => {
return (
<StyledLottie
loop
autoplay
animationData={animationData}
/>
);
}; Hope that helps. |
@jonscottclark that works, thanks! Can you also explain what the syntax would look like to change the color for a single path by name? |
After digging into the developer console I found a solution:
|
The same as other lottie packages like lottie react native supports colorFilters:
I would like to know if it is possible to achieve color icon changing in this package.
Thanks !
The text was updated successfully, but these errors were encountered: