Perfect Horizontal Scrolling CMS in Webflow

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ส.ค. 2024
  • In this tutorial, we'll create a horizontal scrolling section in Webflow using only one interaction that calculates the distance and speed based on the number of items inside.
    00:26 - Creating the layout
    4:17 - Setting up the interaction
    08:13 - Adding in the custom code
    10:21 - Adjusting scroll speed and items in view
    Join my Webflow Wizards Community
    / timothyricks
    Find the code for this project at www.notion.so/timothyricks/CM...
    View the project cloneable at webflow.com/website/TRICKS-CM...
    Try Webflow using my affiliate link below.
    webflow.grsm.io/4840096
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 105

  • @labruda
    @labruda 3 ปีที่แล้ว

    GENIUS! I can't get enough of your tutorials! Mind blowing. Thanks so much for sharing your knowledge

  • @georgy.design
    @georgy.design 3 ปีที่แล้ว +1

    Thanks for the tutorial, Timothy!
    This horizontal scroll is smooth as heck!

  • @rehankhurshid
    @rehankhurshid 3 ปีที่แล้ว +6

    This is just amazing. I am amazed by how you come up with interesting videos everytime. Appreciate your efforts. ✨
    Now that I have watched this one, waiting eagerly for the next one 😄

  • @VideoTest87
    @VideoTest87 3 ปีที่แล้ว +2

    I was just doing one of these the other day, and beating myself up over the dynamic aspect of it! Thanks T!

  • @TheBrenski
    @TheBrenski 3 ปีที่แล้ว +1

    Thanks for a great tutorial! This was driving me nuts using just the interactions.

  • @MichealBeaulieu
    @MichealBeaulieu 3 ปีที่แล้ว +10

    Insane. #1 source of top-rate, real life, useable Webflow knowledge.

  • @jclewis33
    @jclewis33 2 ปีที่แล้ว +2

    Thank you! I have had so much difficulty with getting the horizontal slider right. It works for me, but I have had to mess with it a bunch to get it just right. This looks like a great way to bypass all that extra work.

  • @markbrutusthurman5964
    @markbrutusthurman5964 3 ปีที่แล้ว +1

    A great, clear tutorial Timothy. Thank you.

  • @nicolaspettini3143
    @nicolaspettini3143 ปีที่แล้ว

    Great tutorial for a great animation! Very clear explanations. Thanks so much for sharing this.

  • @thebakedone32
    @thebakedone32 2 ปีที่แล้ว +5

    Bro you're earning me so many promotions. I'm self-employed, but that's not the point. Thanks for the videos!

  • @musicalboy9122
    @musicalboy9122 3 ปีที่แล้ว +2

    Wow, this is real pro videos, thanks timothy

  • @Turlingo
    @Turlingo หลายเดือนก่อน +1

    This is fantastic, Timothy. Thank you!!!

  • @charliegliddon-creativegen9029
    @charliegliddon-creativegen9029 ปีที่แล้ว +1

    you legend mate, thanks for making this video. super helpful and very much appreciated

  • @totallyempty
    @totallyempty 3 ปีที่แล้ว +1

    Absolutely brilliant! Thank you so much!

  • @thewebart
    @thewebart 3 ปีที่แล้ว

    Thank you Timothy. This is perfect!!

  • @dawsonjohnson5305
    @dawsonjohnson5305 2 ปีที่แล้ว +1

    Insanely helpful, thank you!!!

  • @timavodah5864
    @timavodah5864 ปีที่แล้ว +1

    Thanks again Timothy!

  • @vitaliikoval9331
    @vitaliikoval9331 ปีที่แล้ว +1

    You're a genius! Thanks for an awesome tutorial

  • @tjarcovanraalte939
    @tjarcovanraalte939 2 ปีที่แล้ว +3

    Awesome tutorial again! Thanks
    For anyone interested, I made this with a Collection List grid.
    Turn the List class into a grid, with a direction column.
    Only thing to change it to divide the -1REM in the scrolling animation with the ammount of rows from the grid
    Otherwise the scrolling will not stop at the last item
    So a grid with 3 rows = -.033 REM / with 5 rows it would be -.2REM

  • @elisabethcolucci1187
    @elisabethcolucci1187 2 ปีที่แล้ว

    You're a genius! Thanks Tim!

  • @thecsspage5603
    @thecsspage5603 3 ปีที่แล้ว +1

    Awesome video !!

  • @chulwoo7777
    @chulwoo7777 2 ปีที่แล้ว

    Absolute legend. THANK YOU

  • @christiangoran6621
    @christiangoran6621 8 หลายเดือนก่อน +1

    Just have to give it to you. Thanks for amazing tutorials and you are incredibly skilled.

    • @timothyricks
      @timothyricks  8 หลายเดือนก่อน

      Thank you for the encouragement :)

  • @JonSaxton
    @JonSaxton 2 ปีที่แล้ว +1

    Love it, super helpful. Would be helpful if there was a way to recalculate the scroll distance on some event - I've got filtering on the items in my horizontal scroll, and when it filters the list to half the items, the script still wants to scroll through the distance of all the items.

  • @larsson8689
    @larsson8689 3 ปีที่แล้ว +1

    Great video man;)

  • @banders-ralfs
    @banders-ralfs 5 หลายเดือนก่อน

    THANKS🖤

  • @siamgosling
    @siamgosling ปีที่แล้ว

    thanks

  • @aprodan5245
    @aprodan5245 3 ปีที่แล้ว +1

    AWESOME

  • @adamkaufman7463
    @adamkaufman7463 2 ปีที่แล้ว +9

    Incredible stuff! Works beautifully, like everything you make.
    But you might wanna include a note about the collection ".list" class name. In the beginning of the video you said it could be any class name we want, but the bottom of the code provided in Notion calls out ".horizontal-section .list". I couldn't get it to work properly until I caught that. I just changed ".horizontal-section .list" to ".horizontal-section .my-class-name".

    • @tuttoele
      @tuttoele ปีที่แล้ว

      Thanks for this comment, I was struggling finding it out what was happening! 😅

  • @nocodekevin
    @nocodekevin 2 ปีที่แล้ว

    i have to watch your videos at .75 speed but I appreciate em.

  • @jaronarmiger1678
    @jaronarmiger1678 ปีที่แล้ว +2

    Love how you explain the WHY behind every decision you make and walk us through your thought processes (including the initial solutions that don't end up quite working). Learning so much from you videos thank you!!!

    • @kaustik185
      @kaustik185 ปีที่แล้ว

      that emoji is cursed tho

  • @joanditacentika
    @joanditacentika 2 ปีที่แล้ว +2

    thanks a lot for sharing this! I'm wondering is it possible to have more than one horizontal scrolling in one page? Do I just alter the class name and make a new copy of the code?

  • @alchemizesounds5371
    @alchemizesounds5371 2 ปีที่แล้ว

    Love your work! Im trying to use the scroll for multiple categorys, so as the page scrolls vertically each section does a side scroll and continues to scroll vertical?

  • @amandha3119
    @amandha3119 2 ปีที่แล้ว +1

    Very cool! I'm adapting this to be my portfolio site. Is it possible to add a footer to the sticky section? Even setting it to absolute doesn't help, and it's odd to just have the footer pop up at the very end of all the horizontal scrolling.

  • @daphneheraiz-bekkis645
    @daphneheraiz-bekkis645 ปีที่แล้ว

    Thank you ! That's so useful ! Just one comment, it doesn't seem to work when combined with locomotive scroll (using your tuto video because it was the clearest I ve seen :) )Separately they work but not together.

  • @matthewwatson694
    @matthewwatson694 ปีที่แล้ว +1

    Hey Timothy, I hope you're well?
    Great video so thank you for the help! I am struggling with something however and i have seen a few people struggling with the same thing, was hoping you could help? When using this horizontal scroll with the custom code, i cannot seem to have a smooth scroll using custom code as well? I have tried both the locomotive smooth scroll as well as luxy but both working together seems to break the horizontal scroll? any idea how to get around this but still use the smooth scrolling with the horizontal slider?

  • @davejemison
    @davejemison 2 ปีที่แล้ว +3

    Thanks Timothy! I'm using REMS for the entire project rather than EMs like you do. Unfortunately this seems to conflict with the scroll interaction. Do you have any pointers or work-arounds for this (other than use EMs)? :)

    • @kishk.8068
      @kishk.8068 2 ปีที่แล้ว +2

      Having the same problem - did you happen to find any solution?

  • @brandonsmith1638
    @brandonsmith1638 2 ปีที่แล้ว +2

    Is there away to turn the horizontal scroll of for mobile screen devices?

  • @Atoom1990
    @Atoom1990 2 ปีที่แล้ว +1

    I love you

  • @laxi4ka
    @laxi4ka 3 ปีที่แล้ว +1

    Thank you so much for this video! It works so great on desktop. I wonder, is there a way to make the scroll on mobile left to right instead of up to down? On mobile users usually scroll this kinds of cards from left to right.
    Thanks again! You do an amazing work! :)

    • @timothyricks
      @timothyricks  3 ปีที่แล้ว +3

      Thanks for the feedback! I added a desktop only version to the code. Side scrolling could be handled in WebFlow natively with overflow set to scroll

    • @laxi4ka
      @laxi4ka 3 ปีที่แล้ว +1

      @@timothyricks thank you for the answer!

    • @alexisdematos
      @alexisdematos ปีที่แล้ว +1

      @@timothyricks Hey Timothy, thanks for this awesome video, so much value ! I have an issue, I don't find any desktop only code on the notion and i dont know how to cancel the horizontal scrolling for tablet and lower screens, thanks in advance 😁

  • @andyenaod
    @andyenaod 3 ปีที่แล้ว +1

    This is amazing! Been looking for this very thing for several projects. Thanks Tim.
    One question and there may not be a solution but can this be modified to work for varying width items. So for example showing photos in portrait and landscape mode side by side in the scroll without having to show a fixed aspect ratio?

    • @timothyricks
      @timothyricks  3 ปีที่แล้ว +2

      So glad this is helpful! Yes, it's possible just a little more complex to calculate the distance and speed. I'll keep this in mind as an update idea!

    • @adriennwhite
      @adriennwhite 2 ปีที่แล้ว

      @@timothyricks I'm looking for the same solution, did I miss the update?

    • @katielively4007
      @katielively4007 2 ปีที่แล้ว

      @@adriennwhite Same I need this now too :(

    • @smithandgrain
      @smithandgrain 2 ปีที่แล้ว

      @@timothyricks I was able to get the varied width working however on navigating to a new page in a collection with a different total width breaks calculateScroll() for some reason but works on refresh, Iused the Gsap only version. is there a way to invalidate() and rerun calculate scroll on page load. I can't find the correct answer anywhere.

  • @franzruggiero2875
    @franzruggiero2875 2 ปีที่แล้ว

    Hey Timothy! I'm trying to implement this along with smooth scrolling, but it seems that both Locomotive and Luxy both break this interaction. Is it possible to be able to have both?

  • @totallyempty
    @totallyempty 3 ปีที่แล้ว +1

    Any chance to make it loop, so when it reaches the last item, it scrolls to first again?

  • @nickdemore4534
    @nickdemore4534 2 ปีที่แล้ว

    can I use this for full page horizontal scrolling instead of sticky multidirectional scrolling?

  • @davidbradley2308
    @davidbradley2308 3 ปีที่แล้ว +1

    Great video Timothy, I have been trying to get multiple horizontal scrolls on a page. Any thoughts on how I can dynamically set this part of the custom code $('html').css('font-size', moveDistance + 'px'); as I move from one horizontal scroll to a second (or third)?
    After duplicating some of the functions in the custom code, I am unable to get a way to dynamically change this so the REM value in the animation just picks up the first one and then the other scrollers scroll too far as expected horizontal width is fixed.
    Welcome any help and guidance :)

    • @jessypage2172
      @jessypage2172 3 ปีที่แล้ว

      I think I'm having the same issue. -1 REM doesn't work for me. Do we need to adapt anything?

  • @muhammadsaad6556
    @muhammadsaad6556 2 ปีที่แล้ว

    How to add this as a menu and prevent body scroll? Is this possible, what's the other way of doing something like this for a menu of which covers the whole viewport.

  • @ibuxrs594
    @ibuxrs594 8 หลายเดือนก่อน

    Hi and thank you for making this video. Not sure if you or anyone else are still commenting here, but I'm having an issue with this solution having the list items sort of glitch out on mobile - any ideas?
    Edit: It is not specific to mobile, but rather happens when interacting with the list items by touch (either on a mobile phone or in chrome dev tools)

  • @des7638
    @des7638 3 ปีที่แล้ว +1

    👏👏👏👏

  • @kazza666
    @kazza666 3 ปีที่แล้ว

    This is AWESOME! You're not using em's your Wizardry method though...is there a reason why?

    • @timothyricks
      @timothyricks  3 ปีที่แล้ว +1

      Thank you! I just wanted to show that this trick works with px and basic development techniques too.

  • @matigavasheli8936
    @matigavasheli8936 2 ปีที่แล้ว

    Is it possible to have a scroll snap within the javascript?

  • @ivo1833
    @ivo1833 3 ปีที่แล้ว

    Awesome tutorial! However, I can’t seem to get one thing right. When scrolling, the section simultaneously scrolls horizontal and vertical while it only should scroll horizontal during the interaction and after the interaction it should continue scrolling vertically.
    Does anyone know what might be the problem here? I don’t use a CMS list but just divs in flex box. I have made sure that all the classes are the same as in this video and in the code. The simultaneous horizontal and vertical scrolling started after I put in the custom code bit. Before the custom code the interaction worked properly.

    • @timavodah5864
      @timavodah5864 ปีที่แล้ว

      That sounds like something do with how you have applied sticky positioning, did you work it out Ivo?

  • @4.30-pm
    @4.30-pm ปีที่แล้ว

    hello timothy, thanks for your video and your code this exactly what i needed for my project. However i've tried to reproduce the same but the scrolling only work when i'm in tablet breakpoint and under,. Do you know where the issue might came from ?

    • @4.30-pm
      @4.30-pm ปีที่แล้ว

      i've found the problem for those who need: it was the number of item in view that was higher than the number of item that i could have in view ( the size of my item allowed me to fit maximum 2 items in view and in the code it was set for 3 item in view)

  • @GabrielDufresne-gy3mu
    @GabrielDufresne-gy3mu ปีที่แล้ว +1

    Does anyone know how to disable this on mobile? I would like my design to switch to a grid layout on mobile instead.

  • @eeshdsgn
    @eeshdsgn 8 หลายเดือนก่อน

    is it possible to make it work with more than one instance per page? it seems that when I have two different cms lists on page, on both of them length is added. thats with old code provided. the updated code doesn't scroll but few hundred pixels, no matter what setting

  • @Primengine
    @Primengine 2 ปีที่แล้ว

    Is it possible to do this same exact thing, but with arrows that visitors control? I need a CMS newsfeed with 2 items per slide but more like a slider. Can only find CMS newsfeed sliders with 1 item per slide.

  • @joaolucaswork
    @joaolucaswork ปีที่แล้ว

    Hey Tim,
    How do I make the GSAP Draggable plugin work with this code? I'm trying to figure out how to do this, but to no avail.

  • @jamilahmad1277
    @jamilahmad1277 ปีที่แล้ว

    too much space above and below of horizontal sections, is there a way to decrease this space? as we applied 100vh i have small boxes in horizontal scroll and that leave too much space below and above how can i decrease this space?

  • @trishmaguze9558
    @trishmaguze9558 2 ปีที่แล้ว +3

    Hi Timothy. Thank you for this.
    I created the scrolling and it works great. However I'm not sure what I did wrong though. I put -1rem and it stops middle of the list and the other elements don't show. I increased this and now all the elements in the list show but if I add a new item to the list the space at the end gets shorter and shorter and then we're back to how it was when it was -1rem. Is there another way to fix where the scrolling stops.

    • @aldoheubel
      @aldoheubel 2 ปีที่แล้ว

      I have the same! Did you get it fixed?

    • @timavodah5864
      @timavodah5864 ปีที่แล้ว

      @@aldoheubel was it a problem with one of the divs (the contianer perhaps) having overflow hidden?

  • @miguelmao1593
    @miguelmao1593 3 ปีที่แล้ว

    hey, Timothy thanks for this awesome tutorial as always. I've been struggling with an issue that I'm sure it's an easy fix or perhaps something I missed. When the content inside the div that has the interaction start appearing, the items are already scrolled to the left, but when it gets to the middle of the screen it resets to the correct position. I'm using the Wizardy technic, I don't know if this has something to do. I'll appreciate some help! thanks!

    • @zendallx
      @zendallx 3 ปีที่แล้ว

      Best to drop a read-only project link, but it sounds like the interaction has begun as soon as you scroll in to view. Just double check within the interactions, under animation boundries, you've set "0% is when the element is FULLY visable" check 5:11 in the video

    • @JaytelProvence
      @JaytelProvence 2 ปีที่แล้ว

      i think i've having the same issue. it appears at the center and then basically glitches back to the start correct? i have "0% is when the element is FULLY visable" set. did you ever figure out a solution to fix the glitching?

    • @zendallx
      @zendallx 2 ปีที่แล้ว +1

      @@JaytelProvence Drop a read-only link, it's too vague

    • @jokanstudio
      @jokanstudio 2 ปีที่แล้ว

      Hello, in my case, i had a glitch that the card train reset back with a certain % of scrolling in/out view (half of the card - my cards are 100vh). I resolved it just with setting the "Animation boundaries" to "0%: when the element is FULLY invisible" & "100%: when the element STARTS EXITING". It works perfectly now.

  • @volodymyrsymchuk6762
    @volodymyrsymchuk6762 ปีที่แล้ว

    Thank you for the tutorial!
    On both my personal follow up example and your clonable site the interaction still doesn't work and the collection only moves for -1REM. I doubled checked all the class names. Where the issue can come from?
    Thank you

    • @shrutikashah4513
      @shrutikashah4513 ปีที่แล้ว

      So, you need to name your Collection List as 'list' as it needs that specific class name. That fixed this issue for me!

  • @jgustafe
    @jgustafe 9 หลายเดือนก่อน

    Is there a tutorial that talks through the instance where you'd want to have more than one of these sliders on a single page? I'm finding that if I have more than one slider, the first slider factors in the width of the secondary cms sliders.

    • @eeshdsgn
      @eeshdsgn 8 หลายเดือนก่อน

      yeah the same issue here.. Did you manage to resolve it?

  • @OhemgeeJennii
    @OhemgeeJennii 3 ปีที่แล้ว

    Thank you so much for this Tim!! I tried to implement this, but I already had the Scrollify script implemented for section snapping. Once I put in your script, my whole page is broken. Are these two scripts not compatible?

    • @timothyricks
      @timothyricks  3 ปีที่แล้ว

      Good question! I’m not sure if horizontal scrolling would work with scroll snapping because that usually relies on each section being exactly 100vh

    • @OhemgeeJennii
      @OhemgeeJennii 3 ปีที่แล้ว

      @@timothyricks thank you, that makes sense! Just joined your Patreon, I will see if there's anything else fun I can do :)

    • @timothyricks
      @timothyricks  3 ปีที่แล้ว

      @@OhemgeeJennii Thanks so much! Welcome to the wizard community

  • @KatieM-ix1jw
    @KatieM-ix1jw ปีที่แล้ว

    Is there code without CMS?

  • @leonvermij7893
    @leonvermij7893 2 ปีที่แล้ว

    Hey Timothy for me the code works "almost" perfectly i'm having a problem with linkblocks. They aren't clickable until the end of the scroll (te last card suddenly becomes clickable) any idea why? Thanks for all the time you put in these video's really helps a lot.

    • @chrishely8586
      @chrishely8586 ปีที่แล้ว

      Having the same issue. Did you find a solution?

    • @leonvermij7893
      @leonvermij7893 ปีที่แล้ว +1

      @@chrishely8586 Nope I did not discontinued this approach and went for something else

  • @whit564
    @whit564 5 หลายเดือนก่อน

    Cloneable doesn't scroll now?

  • @Brandon_M
    @Brandon_M 2 ปีที่แล้ว +2

    This interaction isn't working. It always flickers when you're scrolling, jumping to the first card of the list. No idea how to fix it.

    • @timavodah5864
      @timavodah5864 ปีที่แล้ว

      I am getting some glitches too

  • @olliewink365
    @olliewink365 3 ปีที่แล้ว

    Have you used a Javascript Library for this code that isn't visible on-site? I've been fiddling with this all day and cant seem to get it to work for some reason. Its just refusing to scroll horizontally, despite copying the code exactly, naming the classes identically and using the same H,W etc.

    • @timothyricks
      @timothyricks  3 ปีที่แล้ว

      I’m sorry to hear that! It doesn’t use any external js libraries. You could try checking the console tab for any errors with conflicting code. The biggest things to check are that the interaction moves all elements with that class from 0rem to -1rem and that there’s no other custom code affecting the html font size. Also that there are more items in the list than the number set for the “items in view” part of the code.

    • @olliewink365
      @olliewink365 3 ปีที่แล้ว

      @@timothyricks Thanks so much for your reply! I love your content, your videos have really helped me up my webflow dev capabilities. I seem to have got the scroller to work. However its not loading with the page (usually takes a few minutes for it to work if at all) and its not going through the full range of items in the list, but is stopping about halfway (theres about 30 cards). Any Ideas? The custom code is in the closing body tag section and is only under some custom cursor hover code, so not sure why its taking so long to load. Any help would be much appreciated!

    • @karinapapalezova9374
      @karinapapalezova9374 3 ปีที่แล้ว

      @@timothyricks I have come across a font size issue, I don't have any custom code, however all of my typography is in REMs, when I paste the script the font size goes to 480px. Any idea how I could solve this?

    • @timothyricks
      @timothyricks  3 ปีที่แล้ว

      @@karinapapalezova9374 Good question! Sadly, this method isn’t compatible with REM font sizes because they can only inherit from the html font size which this code changes to reference the move distance in the WebFlow interaction. PX or EM font sizes would work with this method though.

    • @giacosuito
      @giacosuito 3 ปีที่แล้ว

      @@olliewink365 @Timothy Ricks mine is also stopping halfway

  • @RasmusLiebscher
    @RasmusLiebscher ปีที่แล้ว

    Has anoyone else Problems in Safari?

  • @RevanSID
    @RevanSID 2 ปีที่แล้ว +1

    This is doesnt work anymore?

    • @itsmintvanilla
      @itsmintvanilla 2 ปีที่แล้ว

      did you get this to work?

    • @timavodah5864
      @timavodah5864 ปีที่แล้ว

      It works, just recreated it just now.