@wareme/use-scrollbar-width
v3.1.0
Published
Determine the scrollbar width of the browser
Downloads
16
Readme
use-scrollbar-width
Detects the width of the browser's scrollbar. Returns 0 on the server.
import { useScrollbarWidth } from '@wareme/use-scrollbar-width'
const Header = component(() => {
const scrollbarWidth = useScrollbarWidth()
return <StyledHeader $scrollbarWidth={scrollbarWidth} />
})