Jump to content
Search Community

ScrollTrigger Card Stacking

madwhiffery test
Moderator Tag

Recommended Posts

I'm attempting to recreate a card-stacking effect except with gsap this time. I've successfully done what I wanted to do with css, but I've been having a problem expanding on the css. Let me explain-

The effect I want to achieve is basically A set of frames each of which scrolls into view, freezes to enable a horizontal scrolling section, then shrinks to pin itself at the very top, like a set of stacked index cards. Getting position: sticky and scrollTrigger pin to play nice with each other seemed quite difficult so I'm now attempting to do the whole thing with scrollTrigger instead. You can look at the embedded codepen to see my current problem. I've tried to remove everything except some very minimal styling.

 

You can look at an earlier prototype of the effect with position sticky, at this

See the Pen PoRvRQY by teab0t (@teab0t) on CodePen

. Here it does everything except freeze and shift the content# container horizontally.

 

So to sort of reiterate and hopefully clear it up again- its basically attempting to scroll to a section, freeze it in place and start a horizontal scroll, then shrink that section but still keep it pinned, and let the next section come in, rinse and repeat. Each section will have a slight offset from the top in order to achieve a kind of "stacked index cards" look. Not looking for a complete solution, any pointers to take me in the right direction or possibly what I'm doing wrong would be super super appreciated. I've gone through the common mistakes segment, and I'm just sort of stuck here right now. Thanks in advance!

 

alternate link in case the current prototype codepen didn't embed

See the Pen xxWNWdW by teab0t (@teab0t) on CodePen

Link to comment
Share on other sites

Hm, I don't see any horizontal scroll stuff and I'm pretty unclear about how you want it all to work, sorry. 

 

We love helping with GSAP-related questions, but unfortunately we just don't have the resources to provide free general consulting, logic troubleshooting, or "here are my list of requirements....now please tell me how to build it all" tutorials, although I know you said you are NOT expecting that. You just wanted some pointers but even that involves a lot of deep strategizing and thinking through stuff, looking at your structure, etc. That's very time-intensive. Of course anyone else is welcome to post an answer if they'd like - we just want to manage expectations.  

 

You can post in the "Jobs & Freelance" forum for paid consulting, or contact us directly. 

 

Otherwise, if you've got a GSAP-specific question just post that here along with a minimal demo and we'd be happy to take a look. 

Link to comment
Share on other sites

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

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...