0.0.4 • Published 7 years ago

scroll-bar-width v0.0.4

Weekly downloads
35
License
MIT
Repository
github
Last release
7 years ago

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.