scroll-bar-width

0.0.4 • Public • Published

scroll-bar-width

Detect browser scroll bar width (e.g. 15px on Mac, 25px on Windows etc)

Example

 
var scrollBarWidth = require('scroll-bar-width');
 
// initialize it once in your code
scrollBarWidth.init();
 
// get the width
var width = scrollBarWidth.get();
 
console.log(width) // ----> 25px on Windows

Install

npm install scroll-bar-width --save

Test

npm t

NOTE: Test requires beefy to be installed globally.

License

MIT, see LICENSE.md for details.

/scroll-bar-width/

    Package Sidebar

    Install

    npm i scroll-bar-width

    Weekly Downloads

    24

    Version

    0.0.4

    License

    MIT

    Last publish

    Collaborators

    • namniak