npm.io
0.0.4 • Published 9 years ago

scroll-bar-width

Licence
MIT
Version
0.0.4
Deps
0
Vulns
0
Weekly
0
Stars
11

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.

Keywords