Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mvsde/scrollbar-width
Calculate the scrollbar width
https://github.com/mvsde/scrollbar-width
Last synced: 30 days ago
JSON representation
Calculate the scrollbar width
- Host: GitHub
- URL: https://github.com/mvsde/scrollbar-width
- Owner: mvsde
- License: mit
- Created: 2018-08-28T06:16:21.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2023-10-18T15:44:25.000Z (about 1 year ago)
- Last Synced: 2023-10-18T16:41:44.529Z (about 1 year ago)
- Language: JavaScript
- Size: 839 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Scrollbar width
## Installation
```bash
yarn add @mvsde/scrollbar-width
# or
npm install @mvsde/scrollbar-width
```## Usage
```js
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 })
```