{"repo":"theKashey/react-remove-scroll","free":true,"listed":false,"github":"https://github.com/theKashey/react-remove-scroll","clone":"git clone https://github.com/theKashey/react-remove-scroll.git","description":"Removes and disables 📜in a \"React\" way","language":"TypeScript","stars":941,"topics":["react","scroll"],"license":"MIT","category":"ui-components","readme_excerpt":"React-remove-📜 dont even scroll react-remove-scroll ==== Disables scroll outside of children node. - 🖱 mouse and touch devices friendly - 📈 vertical and horizontal - 📜 removes document scroll bar maintaining it space - ✅ support nested scrollable elements - 🕳 supports react-portals (uses React Event system) - ☠️ it could block literally any scroll anywhere Usage Just wrap content, which should be scrollable, and everything else would not. RemoveScroll accept following props - children - [enabled] - activate or deactivate component behaviour without removing it. - [allowPinchZoom=false] - enabled \"pinch-n-zoom\" behavior. By default it might be prevented. However - pinch and zoom might break \"scroll isolation\", and disabled by default . - [noRelative=false] - prevents setting position: relative on the body. - [noIsolation=false] - disables outer event capturing. Event capturing is React friendly and unlikely be a problem. But if you are using shadowbox of some sort - you dont need it. - [inert=false] - ☠️(be careful) disables events the rest of page completely using pointer-events except the Lock(+shards). React portals not friendly, might lead to production issues. Enable only for rare cases, when you have to disable scrollbars somewhere on the page(except body, Lock and shards). - [forwardProps] - will forward all props to the children - [className] - className for an internal div - [removeScrollBar] - to control scroll bar removal. Set to false, if you prefer to keep it","default_branch":null,"files":null,"tree":[],"storefront":"/r/theKashey","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/theKashey/react-remove-scroll/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}