JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1978
  • Score
    100M100P100Q115576F
  • License MIT

Custom scrollbars with native scrolling

Package Exports

  • gemini-scrollbar
  • gemini-scrollbar/gemini-scrollbar.css

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gemini-scrollbar) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

gemini-scrollbar

Custom scrollbars with native scrolling.

Dependencies

None

Usage

Browser

<link src="<path-to-gemini-scrollbar>/gemini-scrollbar.css">
<script src="<path-to-gemini-scrollbar>/index.js"></script>
<script>
    var myScrollbar = new GeminiScrollbar({
        element: document.querySelector('#my-scrollbar')
    }).create();
</script>

Bower

bower install gemini-scrollbar --save

CommonJS

npm install gemini-scrollbar --save
var GeminiScrollbar = require('gemini-scrollbar')

var myScrollbar = new GeminiScrollbar({
    element: document.querySelector('.my-scrollbar')
}).create();

Methods

Create

Bind the events, create the required elements and display the scrollbars.

myScrollbar.create();

Update

Recalculate the viewbox and scrollbar dimensions.

myScrollbar.update();

Destroy

Unbind the events and remove the custom scrollbar elements.

myScrollbar.destroy();