All Projects → forsigner → angular-nice-bar

forsigner / angular-nice-bar

Licence: MIT license
A nice and lightweight scrollbar in Angular.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Angular-nice-bar

A nice and lightweight scrollbar in Angular.

Demo

Demo

Install

bower install angular-nice-bar --save

Usage

<link rel="stylesheet" href="bower_components/angular-nice-bar/dist/css/angular-nice-bar.css" />

<script src="bower_components/angular-nice-bar/dist/js/angular-nice-bar.js"></script>
angular.module('app', ['ngNiceBar']);

As a directive

angular.module('app', ['ngNiceBar']);
<div nice-bar nice-bar-delay="1000" nice-bar-theme="dark">
  <!-- content here-->
</div>

As a service

<div id="container">
  <!-- content here-->
</div>
angular.module('app', ['ngNiceBar'])
.controller('HomeCtrl', function($scope, niceBar) {
  $timeout(function() {
    niceBar.init(document.getElementById('container'));
  }, 10);
});

Custom theme

You can custom scrollbar style with CSS easily:

.nice-bar .nice-bar-slider-y {
  background: #222;
  /* whatever */
}

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].