Skip to content

Trigger on load - feature request #9

@oom-

Description

@oom-

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. 👍🏻

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions