Jump to content


Vertical pin and change number

Recommended Posts

Hello guys, i need help with the design i need to achieve. I have a vertical line, with 4 sections in this case, where i need to move number while scrolling on that vertical line and change the number when it hits the section dot.  If anyone can help with it, i would appreciate a lot.


Screenshot 2022-03-25 at 13.03.02.png

Link to comment
Share on other sites

based on the info provided I would start by:

  1. place your number holder in a fixed spot like 200px from top of the page
  2. create a ScrollTrigger for each circle
  3. set each ScrollTrigger to have a start:"top 200px"
  4. give each ScrolTrigger an onEnter callback that increments a number. start with just a console.log(count++) or similar

Try to get this working in a minimal demo. Don't focus on the design at all. Just some colored divs that move up and down the page when you scroll is a good place to start.


If you get stuck, just post your demo here and I'll take a look.


  • Like 3
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.