In Ace's demo only native browser scrollbars are used. However you can also use a plugin, for example SimpleBar is a good one.
If an element has data-ace-scroll attribute, scrollbars are added to it on page load:
<div class="mydiv" data-ace-scroll>
...
</div>
The following options can be passed to ace-scroll attribute or to aceScroll function:
Can have one of the following values:
native: is the default value and adds native scrollbars to the elementauto: preferrably adds native scrollbars in modern browsers and if not available uses a plugin (if the plugins is available and included)plugin: adds plugin scrollbars (if the plugins is available and included)
If true will make the scrollbars fade in/out on mouse hover in most modern desktop browsers (except Edge)
Optionally sets the max-height of the element to enable scrollbars
Is false by default so when an element reaches end of scrolling, body element will start scrolling.
Setting to true disables it (older browsers don't support this)
Currently grey is available for grey scrollbars
Default is true. If set to false scrollbar will always be visible
Can be mobile or desktop and will not add scrollbars on that device.
Navbar messages menu for example, doesn't have scrollbars in mobile devices.
Is the name of the plugin you want to use. Default is SimpleBar. However you may want to directly call the plugin's constructor itself rather than through aceScroll
Will be passed to the plugin
<div class="mydiv" ace-scroll='{"smooth": true, "height": 300}'>
...
</div>
or later throught Javascript
$('#mydiv').aceScroll({
height: 300,
smooth: true,
lock: true
});
So you may need to add some padding to the element's children so they are fully visible:
<div class="mydiv" ace-scroll='{"smooth": true, "height": 300}'>
<div class="px-2">
My Content
</div>
</div>
For sidebar I recommend only sticking to native browser scrollbars for better performance specially on mobile devices. Please see Sidebar scrollbars
You can set color option to grey for grey scrollbars instead of blue.
Also you can change scrollbar colors of an element to match Ace's by adding .ace-scrollbar class to it, without invoking any functions, etc...
And to change the colors of scrollbars, modify $scrollbar-thumb and $scrollbar-track in _variables.scss
Dark sidebars have different scrollbar colors, and you can change that in _sidebar-themes-variables.css by modifying scrollbar-thumb and scrollbar-track values
for a specific sidebar theme