Anime JS equivalent for pinned scroll observer? #1063
|
How would one make this sticky effect in Anime? let tl = gsap |
Answered by
juliangarnier
Aug 5, 2025
Replies: 1 comment 1 reply
|
There is no built-in sticky helper on the .sticky-container {
height: 400lvh;
}
.sticky-content {
position: sticky;
top: 0;
}animate('.sticky-content .square', {
rotateY: 360,
autoplay: onScroll({
target: '.sticky-container',
enter: 'top top',
leave: 'bottom bottom',
sync: 1,
debug: true,
}),
})You can see a live example here: https://codepen.io/juliangarnier/pen/RNwvWGe?editors=0110 |
1 reply
Answer selected by
monolithMktg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is no built-in sticky helper on the
onScrollmethod, but syncing sticky positioned elements with scroll animation is relatively straight forwards with Anime.js:You can see a live example here: https://codepen.io/juliangarnier/pen/RNwvWGe?editors=0110