Video není dostupné.
Omlouváme se.

MOMENTUM Scrolling with Smooth-Scrollbar.js!

Sdílet
Vložit
  • čas přidán 15. 06. 2020
  • Visit linode.com/designcourse for a $20 credit on your new linode account.
    designcourse.com - Learn UI/UX from Scratch with my new service (coming soon)
    -- Today, we're checking out a tiny 2kb solution for implementing momentum scrolling on your layouts (smooth-scrollbar.js). I'll show you how to get up n' running in a jiffy!
    github.com/idiotWu/smooth-scr...
    Let's get started!
    - - - - - - - - - - - - - - - - - - - - - -
    Subscribe for NEW VIDEOS!
    My site: designcourse.com
    My personal FB account: logodesigner
    Coursetro FB: coursetro
    Coursetro's Twitter: / designcoursecom
    Join my Discord! / discord
    ^-Chat with me and others
    - - - - - - - - - - - - - - - - - - - - - -
    Who is Gary Simon? Well, I'm a full stack developer with 2+ decades experience and I teach people how to design and code. I've created around 100+ courses for big brands like LinkedIn, Lynda.com, Pluralsight and Envato Network.
    Now, I focus all of my time and energy on this channel and my website Coursetro.com.
    Come to my discord server or add me on social media and say Hi!

Komentáře • 99

  • @DesignCourse
    @DesignCourse  Před 4 lety +11

    I'm going to have to rearrange my terrariums so you can see both. I just added a 9 month old female ball python which is directly behind me! Here's a pic of her and the tank I built: imgur.com/a/jIsNCC7

    • @se7en2021
      @se7en2021 Před 4 lety

      Thank you !

    • @LabhamJain
      @LabhamJain Před 4 lety

      Haha Gary Without Body! 😛😛😛

    • @CabbageYe
      @CabbageYe Před 4 lety

      cool

    • @CodingUnited
      @CodingUnited Před 4 lety +1

      Lol I thought you meant the programming language "python" so I was confused.

  • @swyxTV
    @swyxTV Před 4 lety +84

    floating head look suits you

  • @karansosa1837
    @karansosa1837 Před 4 lety +8

    this is I've been looking for soo long, I've tried so many random plugins thank you so much sir

  • @riyapatel17
    @riyapatel17 Před 4 lety +3

    This is so informative. I wish I knew this earlier. You’re doing such an amazing job to help others 😊😊😊😊

  • @rbarufi
    @rbarufi Před 4 lety +3

    Man I've been looking for this for days... But i didn't knew the name of it, just the effect hahaha.
    Thanks alot!

  • @esseiforte5392
    @esseiforte5392 Před 4 lety +1

    Hi! thank you so much!
    How to slow down and block scrolling with ease when reach to the edge of start and end document?

  • @zacharyzanger9104
    @zacharyzanger9104 Před 4 lety +2

    Floating head for the win! Love the video... Thanks!

  • @CreativeB34ST
    @CreativeB34ST Před 4 lety +1

    Does anyone have experience if this library works well on mobile with touch swiping?

  • @sahilsinghhtc
    @sahilsinghhtc Před 4 lety +1

    Sir, great tutorial. im able to make my scrolling smooth with this js file. But i cant understand the "plugin options" in the last options. Could you please make tutorial on it?

  • @rahul900day
    @rahul900day Před 4 lety

    the scrolling is sooo satisfying

  • @fariskomo581
    @fariskomo581 Před 4 lety

    Anyone i have a question please help me
    When i need to make a responsive website in adobe xd must i make it for every size or not?

  • @arbazkhan-od9sk
    @arbazkhan-od9sk Před 4 lety

    I love the music at the end

  • @Abhishek-dp5tc
    @Abhishek-dp5tc Před 4 lety +3

    How can i add this to my react

  • @gaurabdhakal13
    @gaurabdhakal13 Před 3 lety +1

    Is there a way to get this smoothness in a wordpress website

  • @DigitalDesigns1
    @DigitalDesigns1 Před 3 lety

    can you paste the cdn version I want to see if I can get this working in wordpress for a client. Thank you.

  • @jer254
    @jer254 Před 4 lety +2

    Very creepy floating head... I love it LOL

  • @narenstudio5
    @narenstudio5 Před 3 lety

    @simon sir it works when Im running it from my visual studio code after pushing it to the github, then I tried to open it from github but the smooth animation is not working ,it remains default any way to fix
    Im creating my portfolio please reply me Im your huge fan

  • @AyushSinghxda
    @AyushSinghxda Před 4 lety +15

    Hey Gary, it's all good, but isn't it considered as bad UX?
    And the moment you club it with GSAP ScrollTrigger/ ScrollMagic, it doesn't allow to pin the elements because of transforms.
    Also considering the fact that all major browsers are providing native smooth scroll now.

    • @mann_von_welt
      @mann_von_welt Před 4 lety +1

      You can use scrollbar.isVisible(element) to check if you reached an element and then apply some css animation, gsap, or whatever. I would not say it's bad UX, but it should only be used at kinda playful / experimental sites.

    • @AyushSinghxda
      @AyushSinghxda Před 4 lety +1

      @@mann_von_welt Pinning of elements is not possible as smooth scroll applies position: fixed over parent element. Position: fixed inside a position: fixed is not relative to viewport but the parent element.

  • @harpreetsingh-tn6em
    @harpreetsingh-tn6em Před 2 lety

    thanks but unfortunately i got into a problem . scrollmagic did not work properly when i used smooth-scrollbar .can you help me with that

  • @DavidMartins1
    @DavidMartins1 Před 3 lety

    Does anyone know a way to add momentum scrolling horizontally? I've been looking for days, it's driving me crazy.

  • @SherwinlouwZa
    @SherwinlouwZa Před měsícem

    how do we work with scroll events now using this?

  • @karansosa1837
    @karansosa1837 Před 4 lety

    it affects my internal CSS in my project, can anyone help me here?

  • @mbusokotobe6276
    @mbusokotobe6276 Před 4 lety

    This is awesome

  • @heinekhalwin8735
    @heinekhalwin8735 Před 4 lety

    How do u even find all these cool js libraries ? Awesome video !

  • @sebastianf9831
    @sebastianf9831 Před 4 lety

    OMGGGGG FINALLY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @grxvethreat903
    @grxvethreat903 Před 2 lety

    Hey! how make fixed position with smooth-scroll?)

  • @bloodtusk7160
    @bloodtusk7160 Před 2 lety

    Pls help me.
    How to turn off the scrollbar completely?

  • @Abdullah_Osama
    @Abdullah_Osama Před 4 lety

    happy to meet you gary timeline

  • @SohailKhan-tc8uz
    @SohailKhan-tc8uz Před 4 lety

    Nice t-shirts bro

  • @farvessafiyudeen0741
    @farvessafiyudeen0741 Před rokem

    Hey guys does anyone know how to change color of the smooth scrollbar.js?

  • @Bakkali.Soufian
    @Bakkali.Soufian Před 4 lety

    isnt it the same as scroll behaviour in css

  • @freshwire
    @freshwire Před 4 lety +22

    I find websites that force a scrolling behaviour on me very annoying. I disable smooth scrolling in my browser for a reason!

    • @alanpeople1
      @alanpeople1 Před 4 lety

      What reason is that, by the way?

    • @BlueJDev
      @BlueJDev Před 4 lety

      I swear this same guy did a video recently in which he said this was a bad idea?!

    • @tommygecko
      @tommygecko Před 4 lety

      The first time I ran into this I hated it too. I think it really depends on how you use it. What a plugin like this essentially does is take away some control from the user in exchange for nice looking effects. As long as you don't give the user a need to scroll in a controlled manner, it should be fine (for example when reading long bodies of text, having the text 'jump' when scrolling down causes the reader to lose track of where he/she was reading and forces the eyes to change focus. Worse, if the reader naturally reacts by scrolling in the opposite direction to correct this, he/she will just go back to the previous position. He/she just made 2 actions without any progress, that is just super annoying UX)

  • @ThatGuyAnonymous
    @ThatGuyAnonymous Před 4 lety

    The floating head freaked me out, I was reading something on a different tab then I switched to this one.

  • @EliSamba
    @EliSamba Před 3 lety +4

    Hey Gary, Lovely stuff. I am a graphic designer wanting to improve my web design skills. My question is: Is it possible to use this tool and process on a website builder such as Wix? Sorry if it is a silly question, I believe the word to describe my skill level is a "noob" 😊

    • @iamcaviar2674
      @iamcaviar2674 Před 2 lety +1

      It's 1 year later but no, Wix can not be self hosted so you don't have control over the javascript libraries you wanna use. It's just for the people who want to drag and drop design websites and a bit f css tweaks.

    • @EliSamba
      @EliSamba Před 2 lety

      @@iamcaviar2674 Better late than never! Thank you so much, it is a very helpful answer! 🥰

    • @appleid3223
      @appleid3223 Před rokem

      @@EliSamba still interested in web design? Let’s start a business together.

  • @FarukAhmed-pc5hn
    @FarukAhmed-pc5hn Před 2 lety

    I've tried this but this plugin confilcts with other jquery plugins!

  • @kangzoel8717
    @kangzoel8717 Před 4 lety +8

    Smooth scroll makes me feel weird

  • @FarukAhmed-pc5hn
    @FarukAhmed-pc5hn Před rokem

    What about fixed elements? Position: fixed not working!

  • @shareskill91
    @shareskill91 Před rokem

    Do not work when height of the sections to 100vh

  • @DirePantsDim
    @DirePantsDim Před 2 lety

    Very informative, but due to the "highjacking" of the scroll function of the browser, this plugin makes any sticky navbar immobile.

  • @jasonszsilva3489
    @jasonszsilva3489 Před rokem

    how to do this to php

  • @vitus6644
    @vitus6644 Před 4 lety +3

    its not working. i have: Uncaught SyntaxError: Cannot use import statement outside a module

    • @ren-design
      @ren-design Před 4 lety

      the needs to be at the end of the body

    • @vitus6644
      @vitus6644 Před 4 lety

      @@ren-design i used another smooth scroll script and its working perfectly. github.com/cferdinandi/smooth-scroll

    • @christopherk4166
      @christopherk4166 Před 4 lety

      I'm new to this as well, but I think you just need to add "type='module'" to the script tag. You can learn more by googling "ES6 imports"
      It should look something like this:

  • @yasser.dev7
    @yasser.dev7 Před 4 lety

    I like you bro !

  • @clleoweb4083
    @clleoweb4083 Před 4 lety

    smooth-scrollbar.js - weight does 42 kb.. ??? Why would you do that? You said 2 kb, right?

  • @user-gn6iw4jb2t
    @user-gn6iw4jb2t Před 4 lety

    import Scrollbar isn't working!

  • @brambekkers
    @brambekkers Před 4 lety

    Var? anno 2020?

  • @peoplewithpixels
    @peoplewithpixels Před 4 lety

    Ray-man coding today I see

  • @ErwinMeulman
    @ErwinMeulman Před 3 lety

    Smooth scrolling is a mess, same as the volume, controlled by the OS, browser and on your speakers. With the OS on 3 lines per scroll (Windows, Linux, MacOS) and a trackpad and flywheel mouse, surface dial and a JavaScript I confused how far I need to scroll.

  • @alaazarrouk5941
    @alaazarrouk5941 Před 3 lety

    it's not working !! please can you respond

  • @Trazynn
    @Trazynn Před 4 lety +3

    I'm learning Javascript and it's going alright and all. But all Javascript tutorials are about objects, and classes, and databases. And that's great, i understand that's important. But to a designer it seems that all of that, yes, the core of javascript, the fundamentals, can be skipped in favour of just importing these libraries that let you animate cool shit. I don't need to develop an app I just want things to wiggle and swoosh.

  • @Kevzz2srs
    @Kevzz2srs Před 4 lety +3

    Man so glad ublock exists else I would've gone insane from websites having their own comedian scrolling speeds shits just annoying.

  • @arghyabanerjee900
    @arghyabanerjee900 Před 2 lety

    Are you a guitarist along with a developer 😍😍😍😍😍😍...??????

  • @beinyourguard
    @beinyourguard Před 4 lety

    what does npm init -y do? why the flag?

  • @Maybehassanawad
    @Maybehassanawad Před 4 lety

    Nice floating head

  • @alperburakpusar1051
    @alperburakpusar1051 Před 3 lety

    Doesn't work right with perspective parallax..

  • @harshjain8345
    @harshjain8345 Před 3 lety

    Can you give me some tips to integrate floating head like yours..in my website😂😂😂...

  • @bendyamin86
    @bendyamin86 Před 4 lety +1

    This will break any "appear on scroll" animations as it high jacks the native scroll events and won't be able to calculate the window height and top values.

  • @quickindiarecipe
    @quickindiarecipe Před 4 lety

    parallax doesn't work with this

  • @yogeshdeveloper5346
    @yogeshdeveloper5346 Před 4 lety +1

    First!

  • @chandarraja1119
    @chandarraja1119 Před 4 lety

    at the end of the each video please speak about browser support like chrome edge and firefox won't be a problem here. speak about IE! support😭😞.

    • @CreativeB34ST
      @CreativeB34ST Před 4 lety

      Just drop IE support, it's not worth it. Browser is dead. People who still use it should move on or use at own risk.

  • @fullstack_journey
    @fullstack_journey Před 4 lety

    that floating head facecam is creepy, include the shoulders too please

    • @malcolmrodrigues911
      @malcolmrodrigues911 Před 4 lety

      He had a green shirt in front of a green screen. Wasn't intentional

  • @user-zd5ee
    @user-zd5ee Před 4 lety

    Author:
    body {
    visibility: hidden;
    }

    • @CloudyyYT
      @CloudyyYT Před 3 lety

      you dont need : after author

  • @mistekfcio
    @mistekfcio Před 3 lety

    I absolutely hate it when a website or an app overrides browser default scrolling behaviour. It's a bad practice in my opinion

  • @franny8480
    @franny8480 Před 2 lety

    bro not like this.... this floating head makes me nervous xD

  • @asumiluna9066
    @asumiluna9066 Před 3 lety

    BRUH THAT CHIN

  • @SayJee
    @SayJee Před 4 lety +2

    #gary {
    position: absolute;
    left: 0
    bottom: 0;
    }

  • @feronanthus9756
    @feronanthus9756 Před 2 lety

    This is so infuriating. The last thing I want on a desktop is for my mouse wheel to act like scrolling on a mobile phone. I wish developers would stop running code on their websites which override the settings a user chooses on their web browsers and devices.
    Why am I here you ask? So I can find the code snippet some websites use to do this so I can block it.
    "You can notice the scrollbar itself has been hijacked"
    Yeah... good choice of words there.

  • @zorujuro192
    @zorujuro192 Před 4 lety

    Css html{scroll-type:smooth}

  • @alex_chugaev
    @alex_chugaev Před 4 lety +16

    DONT DO THIS PLEASE, ITS ANNOYING

  • @masterkhoa
    @masterkhoa Před 4 lety

    smooth scrolling is counter-intuitive and generally annoying. REMOVE

  • @nerosonic
    @nerosonic Před 4 lety

    floating head /watch?v=HQoRXhS7vlU