Jump to content
Search Community

Vertical slider on scroll (with new section covered older)

Arzou

Go to solution Solved by Arzou,

Recommended Posts

Posted

Hello everybody ! 
it's my first message here, I've searched the forum for a long time for an answer to my question but couldn't find anything.
I would like to create a vertical fullscreen slider, where each new section would come from the bottom, and cover the old one


Here is an example:

https://astoncm.com/
 

(for internal animations in each section, I could take care of it.

Thanks a lot for your help ! 

Clément

See the Pen zYPrZmj by arzou (@arzou) on CodePen.

  • Arzou changed the title to Vertical slider on scroll (with new section covered older)
elegantseagulls
Posted

Hi @Arzou,

 

I don't see a question in your post.

If you're asking us to code an example of the functionality of the sample-site you sent, unfortunately we can't offer free general consulting or "build-to-order" services.

 

A good starting point: Take a look at GSAP's toggleActions and pair that up with something like this:

See the Pen YzyaKrq by GreenSock (@GreenSock) on CodePen.



If you get stuck, post back here with any GSAP-specific questions in a minimal demo and we'd be glad to help with those.

Please read the forum guidelines.

 

  • Like 4
Posted

Hi @elegantseagulls

thanks a lot for your answer. 

I do think I was not clear and I apologize for that.

 

My codepen example is where I'm stuck.

I would like that on scroll, section 2 covers section 1, and section 3 covers section 2, etc etc
Is it possible ?

  • Like 1
Posted

Hey Arzou, I was just in the process of adding something to @elegantseagulls reply.

 

If you are looking to create a slider like on that website, ScrollTrigger might not even be the best tool of choice, as it is dependent on actuall scrolling, while the linked website doesn't look to me like it is scrolling at all, but rather listening to mouse/keyboard/touch events.

 

Similar topics have come up a couple of times recently.

There are examples for event-based sliders in these threads.

 

Most of what those examples contain is the logic neccessary for it to work, which you will likely have to adjust to work like you expect.

 

 

 

 

  • Like 3
Posted

Yes @elegantseagulls, but in your example, the scroll is going too fast, it doesn't pin at each section.. :D 

Thank you very much @akapowl, I'll take a look at the links you gave me.

  • Like 1
elegantseagulls
Posted
6 minutes ago, Arzou said:

but in your example, the scroll is going too fast, it doesn't pin at each section

Right, look at the code for both examples, and explore some others to see if you can combine them to create what you're looking for.

  • Like 2
Posted

Ah yes thank you @mikel !
Do you think there is a way to pin sections during the scroll? To not go to the end of all the sections if the user scrolls a lot at once?

 

Clément

Posted

 

Hey @Arzou,

 

A lot is possible. Be creative in concept and implementation.
Here is a rough layout for a report of a small NGO.
The larger the value, the slower the process:   tt = 25000; // 'total time' in px of scrub animation (line 12).

 

See the Pen 8911550a3b01adf215086bc42091e4f4?editors=1010 by mikeK (@mikeK) on CodePen.

 

Happy tweening ...

Mikel

  • Like 2
Posted

Thanks you @mikel ! I continue to work on it. If I get what I want, I'll post the solution here, it might help someone :)

  • Like 1
  • Solution
Posted

Hi everyone ! 
 

I ended up succeeding in what I wanted to do. I took over one of the projects found thanks to @akapowl

A big thank you to the whole team !

Here, my codepen, if anyone needs :) 

See the Pen ExbPWdR?editors=1010 by arzou (@arzou) on CodePen.

  • Like 1
  • 1 year later...
Posted

@Arzou Any chance you can reshare the codepen? Looking to do something similar to Aston for a client.

Posted

Hi @AaronMark, i'm really sorry but i stupidly deleted it ... If i can help you, it's a pleasure. Tell me what's your problem ;) 

  • Like 1
AaronMark
Posted

@Arzou I have a client looking to do what Aston did, where each section is a slide that is revealed (using masking) and pinned, much like you are requesting in this thread. Mikel's first example is close, but not quite what Aston's site is doing.

Posted

Hi @AaronMark and welcome to the GreenSock forums!

 

Perhaps this example using Clip Path can provide a good starting point:

See the Pen eYjoOEW by GreenSock (@GreenSock) on CodePen.

 

You have to add the scale animation to the images, but adding those to the timeline already in use with the position parameter shouldn't be too complicated.

 

Hopefully this helps.

Happy Tweening!

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...