3.1.0 • Published 11 months ago
@wareme/use-scrollbar-width v3.1.0
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} />
})