useMeasureScrollbar
Measures the scrollbar size (width/height), useful for layout adjustments in scrollable containers.
Usage
Basic usage example to quickly see how the useMeasureScrollbar
works.
browser scrollbar: 0px
API
API | Type | Default | Annotation |
---|---|---|---|
render? | boolean | false | state action isOpen value |
has? | boolean | { has: true } | set attributes data-has-scroll for some element |
modal? | boolean | { modal: true } | remove scroll bar when isOpen = true |
Source Codes
Full working code example, including necessary markup and styles. You can copy and paste this code directly to start using the component immediately.