Share Posted February 20 Hello, I'm new to the implementation of gsap's horizontal scrolling in Nextjs However, I more or less succeeded in doing what I wanted with the view of the solutions provided by the various posts relating to Nextjs, but i'm dry on the implementation of the size of my container which must imperatively be the size of its children! Indeed the container (green) must imperatively stop where the last of the children ends up (purple) except I can't manage to make sure that the last one adapts dynamically (in fact my client can add / remove specialties because in my app I have a backend that dynamically retrieves children and generates them according to the db) https://stackblitz.com/edit/nextjs-8gdt9v?file=components%2FSpecialties%2Findex.tsx I suspect that this must have an impact on the xPercent property or the end() property of my gsap.to but I can't manage to implement it correctly and to control the size of my container in the right way. Or in other way the last child can be stuck at the end of the container and cannot be scrolled at the beginning idk how to solved it ! Can u help me to resolve my pb with any suggestions ? Ty and have a good day Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now