Skip to content
Discussion options

You must be logged in to vote
// This is the usage of anime.js
 animate(".scroll-target", {
        x: [0, "-300vw"],
        autoplay: onScroll({
          container: ".scroll-container",
          // Enters when the bottom of the target meets the center of the container
          enter: { target: "bottom", container: "center" },
          // Leaves when the top of the target meets the top of the container
          leave: { target: "top", container: "top" },
          sync: 1,
          debug: true,
        }),
      });

// This is the sample Element
<div ref={root} className="scroll-container text-center flex h-[calc(200vh)]">
    <div className="sticky top-0 h-screen w-screen flex items-center overflow-hidden">

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Boboiboy181
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant