@mvsde/scrollbar-width
v1.0.0
Published
Calculate the scrollbar width
Downloads
3
Readme
Scrollbar width
Installation
yarn add @mvsde/scrollbar-width
# or
npm install @mvsde/scrollbar-width
Usage
import scrollbarWidth from '@mvsde/scrollbar-width'
// Get the width of the scrollbar
const width = scrollbarWidth()
// Check if page has overflow and then get scrollbar width
const widthWithOverflowTest = scrollbarWidth({ testOverflow: true })