New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

angular-smooth-scrollbar

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-smooth-scrollbar

An angular module that allows you customize smooth scrollbars

  • 2.2.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18
decreased by-47.06%
Maintainers
1
Weekly downloads
 
Created
Source

angular-smooth-scrollbar

smooth-scrollbar for angular projects.

Requirements

Angular 1.4+

Install

Via npm:

npm install angular-smooth-scrollbar --save

Or via bower:

bower install angular-smooth-scrollbar --save

Demo

http://idiotwu.github.io/angular-smooth-scrollbar/

Usage

  1. Include all dependencies in your page file:

    <link rel="stylesheet" href="smooth-scrollbar/dist/smooth-scrollbar.css">
    
    <script src="angular.js"></script>
    <script src="smooth-scrollbar/dist/smooth-scrollbar.js"></script>
    <script src="angular-smooth-scrollbar/dist/angular-smooth-scrollbar.js"></script>
    
  2. Add SmoothScrollbar as dependency to your angular app:

    angular.module('myApp', ['SmoothScrollbar']);
    
  3. Use it wherever you want:

    • As element:

      <scrollbar name="scrollbarName">
          ...
      </scrollbar>
      
    • As attribute:

      <section scrollbar="scrollbarName">
          ...
      </section>
      

Available Options

parametertypedefaultdescription
speedNumber1scrolling speed
stepLengthNumber50how long each scrolling is (px/delta)
easingDurationNumber1000how long will easing takes after touchend event
easingCurveStringcubic-bezier(0.1, 0.57, 0.1, 1)easing timing function, either css timing-function or pre-defined curves here
propagationBooleantrueevent propagation

ScrollbarService

By given scrollbar a name via attribute, you can access your scrollbar instances through ScrollbarService.

ScrollbarService.getInstance( name )

Get scrollbar instance by giving the name, and return a promise with instance.

ScrollbarService.destroyInstance( name )

Remove all event listeners on the named instance, but will not remove scrollbar from DOM.

APIs

Documents

License

MIT.

Keywords

FAQs

Package last updated on 01 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc