-
Notifications
You must be signed in to change notification settings - Fork 12
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
Did the default animation duration change with v1.1.0? #20
Comments
With hyperdrive you mean that all animations run way to fast? Would you mind sharing a code snippet with us? Which animation did you use? |
Here is one example but it is happening in multiple places: import { Loader2 } from "lucide-react";
export const LoadingIcon = ({
size,
}: {
size?: string | number;
}) => (
<Loader2
size={size}
className="animate-spin"
/>
); I've just seen the update re |
Yes I think something like in this comment is happening: The issue now is, sometimes I will animate the container at one speed, and I will animate child elements at another. Should I specify duration everywhere now? <div className="animate-fade animate-duration-300">
<div className="animate-spin"></div>
</div> Previously animate-spin would use default duration. Now it is using 300. |
Ah yes, that will be it. Duration, delay, etc. are now values that are also used for child elements. For many users, this is a plus, because you can for example define a default duration for all animations on the page. But for your scenario it is actually more of a disadvantage. As a quick solution, I would suggest that you also set animate-duration-x for nested animations. |
Hey @heidkaemper, First of all, thank you for this lib. I'm experiencing the same problem and after a little research, I've come to the same conclusion as @lukemorton (same usecase, we're using it for spinner and all of our spinners are one hyperdrive). I must admit that this change is rather surprising, on the one hand because such a change should certainly have provoked a major version change as it's a breaking change for existing applications. On the other hand, the The behavior is not really intuitive and not documented, unfortunately. We'll certainly be sticking with the old version, as it involves far too many changes to specify the duration for each child, knowing that this is not the property's native behavior. I think the subject is closed, but in my opinion this is quite unexpected behavior for most, so I prefer to point it out. Thanks! |
We’ve concluded the same as @Gregory-Gerard and have stuck with an older version. Plan is eventually to remove the dependency with a custom utility or just plain tailwind. |
Thanks for your feedback guys! I reopen this topic. Maybe it's time for a v2.0 with some new approaches. |
I'm not sure if the default just changed, or if upgrading to v1.1.0 has meant my implementation is broke, but all my animations look like they're in hyperdrive.
I've downgraded for now back to v1.0.1
Any pointers would be appreciated 🙏
The text was updated successfully, but these errors were encountered: