Skip to content

Angularjs directive that enables slim scrollbar with CSS customization

License

Notifications You must be signed in to change notification settings

ytlabs/ng-slim-scroll

Repository files navigation

ng-slim-scroll

This project is AngularJS adaptation of kamlekar's slim-scroll ,

All credits goes to kamlekar. I have just tried to reimplement its work in angularjs.

Demo

demo.html file contains example usage. View demo

Installation

$ bower install ng-slim-scroll

Usage

  1. Require ng-slim-scroll.js in your html file

<script src="ng-slim-scroll.js"></script>

  1. Require base CSS style

a. If you use less import ng-slim-scroll.less in your less file

@import "ng-slim-scroll.less"

b. Else require ng-slim-scroll.css in your html file

<link rel="stylesheet" href="ng-slim-scroll.css">

  1. Add module name 'ng-slim-scroll' to your apps dependencies
var app = angular.module('yourApp', ['ngSlimScroll']);
  1. Add slim-scroll or data-slim-scroll attribute to the element you want to add slim scroll

<div data-slim-scroll data-options="options"> long long long text </div>

If you want to provide options to slim scroll instance, as defined in original project, you can use options data field.

About

Angularjs directive that enables slim scrollbar with CSS customization

Resources

License

Stars

Watchers

Forks

Packages

No packages published