prevent-body-scroll

v4.15.0arrow_drop_down
v4.15.0
STATUS
Passing
DOWNLOADS
54
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
588 B
Toggle the body scroll / overflow and additional styling necessary to preserve scroll position and body width (scrollbar replacement)
1 contributor
Install prevent-body-scroll as a package?
Copied
npm i @bit/segmentio.evergreen.prevent-body-scroll
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
chevron_left
chevron_right
preventBodyScroll (
preventScroll:boolean
)

Toggle the body scroll / overflow and additional styling necessary to preserve scroll position and body width (scrollbar replacement)

Argument
preventScroll: boolean

whether or not to prevent body scrolling

Help and resources