Skip to content
This repository was archived by the owner on Mar 30, 2024. It is now read-only.

Latest commit

 

History

History
21 lines (15 loc) · 388 Bytes

README.md

File metadata and controls

21 lines (15 loc) · 388 Bytes

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 })