1.0.10 • Published 4 years ago

custom-scroll-styles v1.0.10

Weekly downloads
2
License
ISC
Repository
-
Last release
4 years ago

Custom Scroll Styles

This package hides the native scrollbar and replaces it with a brand new one you can customise!

How to use?

Step 1: Install required packages with NPM.

npm install --save custom-scroll-styles
npm install --save-dev style-loader css-loader

Step 2: Add the following code to your module.exports object in webpack.config.js:

module: {
	rules: [
	  {
		test: /\.css$/,
		use: [
		  'style-loader',
		  'css-loader'
		]
	  }
	]
}

Step 3: Using Webpack, load the required JS:

import addCustomScrollbar from 'custom-scroll-styles';

Step 4: Call the function below inside your code:

addCustomScrollbar(clrMain, clrSecondary, clrScrollbar);

where...

clrMain - main color set, e.g. "white" or "#fff"
clrSecondary - secondary color set
clrScrollbar - background color of the scrollbar

Enjoy!

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago