ng2-slimscroll
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

ng2-slimscroll

ng2-slimscroll is a customizable scrollbar directive for Angular2.

Make scrollbar looks identical in any browser and any os.

Demo

http://ng2-slimscroll.jankuri.com

You can download demo app here.

Installation:

npm install ng2-slimscroll

Use Example:

// app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { HttpModule } from '@angular/http';
import { FormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
import { SlimScrollModule } from 'ng2-slimscroll';
 
@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    CommonModule,
    HttpModule,
    FormsModule,
    SlimScrollModule
  ],
  bootstrap: [ AppComponent ]
})
export class AppModule { }
 
// app.component.ts
import { AppComponent, OnInit } from '@angular/core';
import { ISlimScrollOptions } from 'ng2-slimscroll';
 
@Component({
  selector: 'app-root',
  template: `<div slimScroll [options]="opts"></div>`
})
export class AppComponent imlements OnInit { 
  opts: ISlimScrollOptions;
 
  ngOnInit() {
    this.opts = {
      position: 'right',
      barBackground: '#000000',
      ... // check ISlimScrollOptions for all options
    }
  }
}

Author

Jan Kuri

Licence

This project is licensed under the MIT license. See the LICENSE file for more info.

Package Sidebar

Install

npm i ng2-slimscroll

Weekly Downloads

359

Version

2.0.1

License

MIT

Last publish

Collaborators

  • jkuri