
It reminds me of my good ol’ beloved Mac. SmoothScroll is a Chrome extension that makes scrolling much smoother in Google Chrome. (Either that or the Placebo effect?)įinally, here’s an extra treat for those of you who use Google Chrome. You should have a noticeable difference in smoothness in your scrolling now. (The area by the time in the bottom right corner of your screen.) When you run it, a little hand icon should pop-up in your system tray. You may find out that Synaptics is the manufacturer behind your trackpad as well.ĭownload and extract TwoFingerScroll. Similarly, if the name of your device is anything other than Synaptics, just give it a quick Google search. So, now I know that I can use the Synaptics software. Fortunately, after a quick Google search, I found out that UltraNav is just Lenovo’s brand for their Synaptics trackpads. You can clearly see that mine doesn’t: it says Lenovo, and the name is UltraNav Pointing Device. In the Manufacturer tab, it could say Synaptics. How do you know if your trackpad is manufactured by Synaptics? In that same Mouse window that you were in before, navigate to Hardware. This application works for all Synaptics-based trackpads.
#Smoothscroll code#
My code is heavily commented so you shoudn't lose yourself too much. You can also change the default duration of a scroll, which is 500ms by default. You can change it quite easily in the code. There is an ease-in-out type timing function. Here are some indications if you want to tweak the code to fit your needs:.This function can easily be an onClick handler in React componentsĮxampleBtn.addEventListener('click', handleClick) Var exampleDestination = document.querySelector('.example-destination') Var exampleBtn = document.querySelector('.example-button') Var smoothScroll = require('smoothscroll')
#Smoothscroll install#
context is the scrolling context (optional, defaults to window, can be any HTMLElement Object)Īlternatively, you can install smoothscroll as a dependency using npm:Įxample usage as a module, binding to a custom element:.callback is a function to be executed when the scrolling is over (optional).duration is the total duration of the scroll (optional, defaults to 500ms).target is a HTMLElement Object from your document that you want to scroll to, or a numeric position on the page.

Window.smoothScroll(target, duration, callback, context) If you want to call a smooth scroll from your code, you can now use the API by calling:

Unsupported browsers would just use the normal internal link behaviour. This works in Firefox, Chrome, IE10, Opera and Safari. It also returns an API that you can use to call a smooth scroll yourself. SmoothScroll will tie all your internal links to a handler that will produce a smooth scroll to their target instead of an instant jump. SmoothScrollA teeny tiny, standard compliant, smooth scroll script with ease-in-out effect and no dependancy.
