jossmac / React Scrolllock
Licence: mit
đ Prevent scroll on the <body />
Stars: â 393
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to React Scrolllock
V Bar
The virtual responsive crossbrowser scrollbar component for VueJS 2x
Stars: â 216 (-45.04%)
Mutual labels: component, scroll, scrolling
react-smart-scroll
Efficient rendering of long lists in React
Stars: â 27 (-93.13%)
Mutual labels: scrolling, scroll
React Scrollspy
đŻ react scrollspy component
Stars: â 382 (-2.8%)
Mutual labels: component, scroll
EasyScrollDots
Single page scroll JavaScript plugin that allows for vertical navigation of page sections
Stars: â 38 (-90.33%)
Mutual labels: scrolling, scroll
react-scroll-trigger
đ React component that monitors scroll events to trigger callbacks when it enters, exits and progresses through the viewport. All callback include the progress and velocity of the scrolling, in the event you want to manipulate stuff based on those values.
Stars: â 126 (-67.94%)
Mutual labels: scrolling, scroll
onscroll-effect
A tiny JavaScript library to enable CSS animations when user scrolls.
Stars: â 35 (-91.09%)
Mutual labels: scrolling, scroll
Mac Mouse Fix
Mac Mouse Fix - A simple way to make your mouse better.
Stars: â 362 (-7.89%)
Mutual labels: scroll, scrolling
Scrollprogress
đ¸ Light weight library to observe the viewport scroll position
Stars: â 148 (-62.34%)
Mutual labels: component, scroll
volx-recyclerview-fast-scroll
An easy to use implementation for fast scroll recyclerview
Stars: â 34 (-91.35%)
Mutual labels: scrolling, scroll
scrollparent.js
A function to get the scrolling parent of an html element.
Stars: â 51 (-87.02%)
Mutual labels: scrolling, scroll
srraf
Monitor scrolling and resizing without event listeners.
Stars: â 26 (-93.38%)
Mutual labels: scrolling, scroll
scroll-sync-react
A scroll syncing library for react that is up to date
Stars: â 49 (-87.53%)
Mutual labels: scrolling, scroll
react-is-scrolling
Simply detect if users are scrolling in your components in a declarative API
Stars: â 17 (-95.67%)
Mutual labels: scrolling, scroll
NoobScroll
A lightweight jQuery Plugin that add some cool function to make scrolling more fun [Archive]
Stars: â 43 (-89.06%)
Mutual labels: scrolling, scroll
Ngx Scroll To
Scroll to any element to enhance scroll-based features in you app. Works for Angular 4+, both AoT and SSR. No dependencies.
Stars: â 269 (-31.55%)
Mutual labels: scroll, scrolling
really-smooth-scroll
A script that smoothen scrolling in the browser
Stars: â 21 (-94.66%)
Mutual labels: scrolling, scroll
React Scrollbars Custom
The best React custom scrollbars component
Stars: â 576 (+46.56%)
Mutual labels: component, scroll
React Scroll Parallax
đŽ React components to create parallax scroll effects for banners, images or any other DOM elements
Stars: â 1,699 (+332.32%)
Mutual labels: component, scroll
use-scroll-direction
A simple, performant, and cross-browser hook for detecting scroll direction in your next react app.
Stars: â 24 (-93.89%)
Mutual labels: scrolling, scroll
Phytouch
Smooth scrolling, rotation, pull to refresh, page transition and any motion for the web - ä¸čŹéĄşćťç觌ć¸čżĺ¨ćšćĄ
Stars: â 2,854 (+626.21%)
Mutual labels: scroll, scrolling
React Scroll Lock
Prevent scroll on the <body />
when a component is mounted.
Install
yarn add react-scrolllock
Usage
import ScrollLock, { TouchScrollable } from 'react-scrolllock';
class Modal extends Component {
state = { lockScroll: false }
render() {
return (
<div>
...
// the lock accepts a single child element, which supports touch-scrolling.
<ScrollLock>
<ElementWithScrollableContent>...</ElementWithScrollableContent>
</ScrollLock>
// if your app structure doesn't allow wrapping like above, the `TouchScrollable`
// component is exposed as a named export.
<ScrollLock />
<TouchScrollable>
<ElementWithScrollableContent>...</ElementWithScrollableContent>
</TouchScrollable>
// you can also toggle the lock based on some state.
<ScrollLock isActive={this.state.lockScroll} />
</div>
);
}
}
Props
ScrollLock
Property | Description |
---|---|
accountForScrollbars boolean
|
Default: true -- Whether or not to replace the scrollbar width when active. |
isActive boolean
|
Default: true -- Whether or not the lock is active. |
children element
|
Default: null -- This element is wrapped internally by the TouchScrollable component. |
TouchScrollable
Wrap an element in the TouchScrollable
component if you need an area that supports scroll on mobile.
This is necessary because the touchmove
event is explicitly cancelled â iOS doesn't observe overflow: hidden;
when applied to the <body />
element đ˘
Property | Description |
---|---|
children element
|
ref => element |
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].