willmcpo/body-scroll-lock
Some data may be outdated โ see provenance labels.
Body scroll locking that just works with everything ๐ observed ยท 2026-10-03
Health v2 ยท maintenance only
23/100
- Activity 0
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) โ computed 2026-10-22. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 3197
- days_rel: n/a
- days_push: 1301
- n_releases_24m: 0
Adoption not part of the score
4097 stars ยท 323 forks observed ยท 2026-10-03
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A small JavaScript library that locks body scrolling on iOS, Android, and desktop browsers while preserving scrolling of a target element such as a modal, lightbox, or flyout. It works with vanilla JS and frameworks like React, Angular, and Vue.
Use cases
- lock body scroll when a modal is open
- prevent background scrolling on iOS Safari
- keep modal content scrollable while freezing the page
- disable body scroll for lightbox overlays
- lock page scroll behind a mobile nav menu
- handle nested scrollable overlays
- reserve scrollbar width when locking scroll
When to choose
- you need reliable body scroll locking on iOS mobile/tablet
- you want to keep a target element (modal, flyout) scrollable
- you use vanilla JS, React, Angular, or Vue
- you need nested target element support or scrollbar width reservation
When to avoid
- you only target modern browsers with native overflow: clip support and want zero dependencies
- you need a maintained solution - the project is in maintenance with its latest release in 2023
- you need scroll locking for a specific framework with an official built-in solution
Facets
library ยท maturity maintenance
ui-components middleware web-development frontend mobile-development browser cross-platform body-scroll-lock scroll-locking ios-safari modal lightbox vanilla-js react vue angular nodejs
2 sources
- readme: https://github.com/willmcpo/body-scroll-lock ยท fetched 2026-10-03 ยท 7ba2800ab5b0
- registry_npm: https://registry.npmjs.org/body-scroll-lock ยท fetched 2026-08-29 ยท 63d674b117ab
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| willmcpo/body-scroll-lock | main | 23 |
For agents
markdown ยท JSON ยท MCP: product_card(name="willmcpo/body-scroll-lock")
Data as of 2026-10-19T08:05:51.212177+00:00 ยท Report a problem