Blazor.Animate
Blazor.Animate copied to clipboard
Page shows element before animation on Blazor Server
I am trying to use Blazor.Animate on Blazor Server page.
I have a div element to ZoomIn with small delay and duration. The element appears when browser first loads before the animation. I need it not to be visible only with animation, and not when page loads to browser.
I tried it with other elements and even plain text. All animations like FadeIn, SlideIn etc. all behave the same way. I see the element, and then it starts animating (I see the element on page without animation, and then it disappears and then animation starts from beginning - creating sort of flicker).
This does not happen on browser refresh but only first time when browser goes to the page url.
How can I prevent browser from showing the object before animation begins - at initial browser display ?
Hi @baktay, I think that it would be possible to call the method via Run() inside the OnAfterRenderAsync
. Would this work?
https://learn.microsoft.com/en-us/aspnet/core/blazor/components/lifecycle?view=aspnetcore-7.0#after-component-render-onafterrenderasync