Custom Bootstrap Scrollbar

Published: 23.10.2019 | Last update: 2.6.2022

Scrollbars are the most common element on any website. You see them all over the place, from social media to e-commerce websites, and they've been around for a long time. But what if you want to create a custom scrollbar that's unique to your website design?

A custom scrollbar might be a nice addition to your website design. You can make it from scratch using JavaScript or CSS, or use one of the many frameworks that have been created for this purpose.

In this tutorial, we are going to create a custom scrollbar using pure CSS, and with another approach using Malihu customScrollbar plugin.

In this tutorial, we're going to create 7 custom scrollbar variants.

These will help you improve your website's user experience and make it more friendly for your visitors.

  • Gradient Scrollbar (blue gradient in our case)

  • Dark circle as a handle + dotted line scrollbar

  • Dark circle as a handle and a light gray thin scrollbar

  • Dark inset scrollbar

  • 3D dark scrollbar

  • and elegant dark & thin scrollbar, as you might know from Apple devices, etc.

Scrollbars

A scrollbar is a form of user interface (UI) element that can be used to scroll through the contents of a window or other display area. Scrollbars are typically vertical and located on the right side of the window, though they may be placed on the left in certain situations.

Because the web is all about content, the scrollbar has become an essential part of modern designs. Scrolling through pages and pages of information is something people do on a daily basis, which means that your website needs to have an effective scroll bar.

If you liked this snippet, you might also enjoy exploring Bootstrap Collapse Panel or Bootstrap Registration Page .

Please note that the interactive editor on this page should be viewed on your laptop or desktop for the best results.

See my free Bootstrap themes Edit this snippet

How to use the snippet

There are two ways to use the snippet:

  • a] Copy it into your project. This means:
    1. Copy content of the HTML, CSS, JavaScript tabs into your project
    2. Make sure that you have jQuery 3 and Bootstrap 4's CSS and JS included in your project too.
    3. That should be it, and you should be good to go.
  • b] Use the "Edit in JSFiddle" link in the top right and play with it in the JSFiddle. After adjusting what you need, you can use the same steps as in a] to develop it locally.
Share on Facebook Share on Twitter Share on LinkedIn