I think you could have a banger here and replace all uses for SAL or AOS library by allowing the animation to start on first load as well.
Edit: You can actually do it by adding the no-intersect attribute to your div.
class="-translate-x-20 opacity-0 intersect:translate-x-0 intersect:opacity-100 transition" no-intersect>something </div>
Maybe it would have been more clear the other way around, intersect doing nothing until the attribute 'intersect' is detected ?
And if you could handle @apply as well and/or proposing presets like "fade-left" "fade-up" etc...
.scroll-fade-left {
@apply -translate-x-20 opacity-0 intersect:translate-x-0 intersect:opacity-100 transition-all;
}
This could be a next standard really useful plugin. 👍🏻
I think you could have a banger here and replace all uses for SAL or AOS library by allowing the animation to start on first load as well.
Edit: You can actually do it by adding the
no-intersectattribute to your div.Maybe it would have been more clear the other way around, intersect doing nothing until the attribute 'intersect' is detected ?
And if you could handle
@applyas well and/or proposing presets like "fade-left" "fade-up" etc...This could be a next standard really useful plugin. 👍🏻