os-scroll-chain

2.0.2 • Public • Published

os-scroll-chain

OverlayScrollbars Extension to prevent scroll chaining

Installation

# with npm
npm install --save os-scroll-chain

# with yarn
yarn add os-scroll-chain

Module

// with es
import 'os-scroll-chain';

// with commonjs
require('os-scroll-chain');

Browser

Include the script file from node_modules directory:

<script type="text/javascript" src="node_modules/os-scroll-chain/dist/os-scroll-chain.min.js"></script>

Or you can use CDN:

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/os-scroll-chain@2"></script>

Usage

Once installed, it can be added to OverlayScrollbars like this:

instance.addExt('scroll-chain');
instance.addExt('scroll-chain', {vertical: false});
instance.addExt('scroll-chain', {vertical: true, horizontal: false});

Options

Option Type Default Value
vertical Boolean true
horizontal Boolean true

If you have discovered a 🐜 or have a feature suggestion, feel free to create an issue on Github.

License

Released under The MIT License. Copyright (c) hamed-ehtesham.

Package Sidebar

Install

npm i os-scroll-chain

Weekly Downloads

33

Version

2.0.2

License

MIT

Unpacked Size

81.8 kB

Total Files

12

Last publish

Collaborators

  • hamed-ehtesham