scroll-width

uses hightech javascript technology to discover your browsers scroll-bar width/height

Usage no npm install needed!

<script type="module">
  import scrollWidth from 'https://cdn.skypack.dev/scroll-width';
</script>

README

scroll-width

Because not everyone hides the scrollbar on OSX ;) Tiny AMD module that will return you the browsers scrollbar width can be installed via bower, AMD is optional.

Installation

NPM

  npm install scroll-width --save

yarn

  yarn add scroll-width

Bower

  bower install scroll-width --save

AMD usage:

  require(['scrollWidth'], function(scrollWidth){
    alert("My scroll's width is " + scrollWidth + "px");
  });

without AMD:

  alert("My scroll's width is " + window.scrollWidth + "px");