awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
willmcpo avatar

willmcpo/body-scroll-lock

0
View on GitHub↗
4,099 stars·327 forks·JavaScript·MIT·10 views

Body Scroll Lock

body-scroll-lock is a DOM scroll locking library and cross-browser scroll controller. It provides utilities to disable page scrolling while maintaining scrollability for specific nested elements across different browsers and devices.

The project functions as a layout shift prevention utility and a web UI modal scroll manager. It includes mechanisms to add padding to the body when scrollbars are removed to prevent horizontal flickering and content shifting.

The library covers scroll management for mobile navigation and modal interactions, enabling specific containers to remain scrollable while the rest of the document body is frozen.

Features

  • Viewport Scroll Locking - Disables page scrolling by applying overflow hidden to the body while maintaining the current scroll position.
  • Scrollbar-Induced Shift Prevention - Prevents horizontal content flickering by adding body padding when scrollbars disappear.
  • Nested Scroll Coordination - Enables specific nested containers to remain scrollable while the main document body is frozen.
  • Nested Scroll Event Frameworks - Provides a framework for coordinating and intercepting scroll events between the locked body and nested scrollable containers.
  • Scroll Locking - Provides utilities for disabling document scrolling specifically during modal or overlay display.
  • Scrollbar Gutter Compensation - Prevents horizontal layout shift by adding padding to the body when the scrollbar is removed.
  • Touch Event Interception - Intercepts and blocks touch events on mobile devices to prevent background scrolling.
  • Mobile Web Navigation Menus - Ensures background stability when mobile navigation menus are active.
  • Cumulative Layout Shift Prevention - Prevents horizontal flickering and content shifting when the scrollbar is removed.
  • Layout Stabilization - Prevents horizontal layout shifts and visual flickering when the browser scrollbar is removed.
  • Modal Overlays - Manages scroll behavior for full-screen overlays and modal windows.
  • Scroll-Lock Offset Compensation - Implements fixed positioning and top offset calculations to prevent content jumping during scroll locks.

Star history

Star history chart for willmcpo/body-scroll-lockStar history chart for willmcpo/body-scroll-lock

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does willmcpo/body-scroll-lock do?

body-scroll-lock is a DOM scroll locking library and cross-browser scroll controller. It provides utilities to disable page scrolling while maintaining scrollability for specific nested elements across different browsers and devices.

What are the main features of willmcpo/body-scroll-lock?

The main features of willmcpo/body-scroll-lock are: Viewport Scroll Locking, Scrollbar-Induced Shift Prevention, Nested Scroll Coordination, Nested Scroll Event Frameworks, Scroll Locking, Scrollbar Gutter Compensation, Touch Event Interception, Mobile Web Navigation Menus.

Which projects share features with willmcpo/body-scroll-lock?

Projects with overlapping indexed features include: umano/androidslidinguppanel — AndroidSlidingUpPanel is an Android custom view component and sliding panel library used to create draggable overlays… didi/cube-ui — cube-ui is a mobile-first Vue.js component library that provides a comprehensive set of pre-built UI elements for… chalarangelo/30-seconds-of-react — This project is a comprehensive collection of reusable code snippets, custom hooks, and implementation patterns for… jamesblasco/modal_bottom_sheet — Modal bottom sheet is a cross-platform mobile UI framework plugin for Flutter that renders advanced modal bottom… react-native-community/react-native-modal — This project is a cross-platform UI component for React Native applications that provides a customizable overlay… chrisbanes/android-pulltorefresh — Android-PullToRefresh is an Android view component and library designed to implement pull-to-refresh functionality and…

Projects sharing features with Body Scroll Lock

These projects share indexed features with Body Scroll Lock. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • umano/androidslidinguppanelumano avatar

    umano/AndroidSlidingUpPanel

    9,456View on GitHub↗

    AndroidSlidingUpPanel is an Android custom view component and sliding panel library used to create draggable overlays that slide up from the bottom of an application screen. It functions as a nested scrolling UI framework that coordinates touch events between a draggable panel and its internal scrollable content. The library distinguishes itself through a parallax effect implementation that shifts background content at different speeds than the foreground panel. It supports the definition of intermediate anchor points to create partial-view states and allows for transition physics customizati

    Java
    View on GitHub↗9,456
  • didi/cube-uididi avatar

    didi/cube-ui

    9,116View on GitHub↗

    cube-ui is a mobile-first Vue.js component library that provides a comprehensive set of pre-built UI elements for building touch-based mobile web applications. The library is built on Vue's single-file component architecture and supports on-demand ES module imports, allowing developers to selectively load only the components they need to optimize bundle size. It also offers plugin-based global registration for convenient setup and includes a CLI scaffolding tool to generate project skeletons with pre-configured build settings. The library distinguishes itself with a gesture-driven interaction

    JavaScriptcube-uijavascriptui-library
    View on GitHub↗9,116
  • chalarangelo/30-seconds-of-reactChalarangelo avatar

    Chalarangelo/30-seconds-of-react

    5,081View on GitHub↗

    This project is a comprehensive collection of reusable code snippets, custom hooks, and implementation patterns for building user interfaces with React. It serves as a library of short examples designed to solve common development tasks, ranging from state management to DOM integration. The collection provides a wide array of specialized utilities for interacting with browser APIs, including window dimension tracking, media query evaluation, and online status monitoring. It also includes practical guides and snippets for performance optimization, such as memoization, lazy loading, and state c

    JavaScripteducationjavascriptlearn-to-code
    View on GitHub↗5,081
  • jamesblasco/modal_bottom_sheetjamesblasco avatar

    jamesblasco/modal_bottom_sheet

    1,966View on GitHub↗

    Modal bottom sheet is a cross-platform mobile UI framework plugin for Flutter that renders advanced modal bottom sheets and interactive overlay components. It provides a specialized routing mechanism for custom route-based modal presentations, layout utilities for edge-to-edge safe area inset handling, gesture interception systems for nested scroll view coordination, and navigation structures for sequential modal overlay stacking. The library supports platform-adaptive widget styling that dynamically switches between Material Design and iOS Cupertino visual guidelines based on the host platfo

    Dartcupertinodartflutter
    View on GitHub↗1,966
Compare all 30 related projects→