0

I'm using NextJS, react-locomotive-scroll and ScrollTrigger’s pin function to pin a testimonial, scroll through it horizontally and then move further down. However, due to react-locomotive-scroll, I need to use the data-scroll-container attribute on my container, which does not work with pin: true in ScrollTrigger, as it makes the element position: fixed and the element therefore disappears. Here is a minimal demo: https://codesandbox.io/s/cool-noyce-108h6c?file=/pages/index.tsx

When manually setting it to position: absolute the element is there again – this of course does only work as long as you’re not scrolling. Is it related to the data-scroll-container attribute? Is there a fix to pin it?

Thanks in advance!

inzn
  • 61
  • 8

0 Answers0