@advdominion/get-scrollbar-width

This commit is contained in:
Valentin Silytuin
2024-04-27 23:51:01 +04:00
parent 5359166f88
commit 4f059e3298
4 changed files with 61 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
# get-scrollbar-width
Get window scrollbar width (if present):
```js
import { getScrollbarWidth } from '@advdominion/get-scrollbar-width';
console.log(getScrollbarWidth());
```
Get system scrollbar width:
```js
import { getScrollbarWidth } from '@advdominion/get-scrollbar-width';
console.log(getScrollbarWidth(false));
```