Create Custom Scrollbars With Pure JavaScript – scrollBot

Category: Javascript | June 19, 2017
Author: akzhy
Views Total: 3,231 views
Official Page: Go to website
Last Update: June 19, 2017
License: MIT


Create Custom Scrollbars With Pure JavaScript – scrollBot


scrollBot is a vanilla JavaScript library that appends a highly customizable scrollbar to your scrollable container.

How to use it:

Put the scrollBot’s script in the document and we’re ready to go.

<script src="scrollbot.js"></script>

Create a new scrollBot object and specify the target container.

var myDemo = new scrollbot(".container", WIDTH);

Apply your own CSS styles to the custom scrollbar.

var myDemo = new scrollbot(".container",10).setStyle({

Scroll to a specific position within the scrollable container.


Execute a custom function when scrolling.


Refresh the scrollbar that is useful in window resize.


You Might Be Interested In:

Leave a Reply