A Custom scroll bar component in angular with customization options
see Stackblitz Demo here Available in NPM
Angular compatibility
Angular Version | package version |
---|---|
angular 2.x.x - 11.x.x | 0.0.1 and above |
angular 11.x.x - 17.x.x | 0.0.4 and above |
-
Run
npm i ng-scroller --save
in command prompt from root of your project folder -
Add to declarations array in app module
declarations: [
NgScrollbarComponent
],
- Then add
<ng-scrollbar>
component to where you want to add scroll<ng-scrollbar [options]="options"></ng-scrollbar>
options
is optional
Options
can accept multiple classes that will be added to parent containers. so pass appropriate classes
interface Options {
containerClass?: string;
progressBarClass?: string;
}
- Angular
- Clone this repo with git.
- Install dependencies by running
npm install
within the directory that you cloned (probablyng-scrollbar
). - Start the development server with
ng serve --o
. - Open development site by going to http://localhost:4200 in your browser.
Edison Augusthy 💻 |