{"id":20014670,"url":"https://github.com/willmendesneto/ngx-scroll-lock","last_synced_at":"2025-08-05T08:17:33.040Z","repository":{"id":33822484,"uuid":"162808063","full_name":"willmendesneto/ngx-scroll-lock","owner":"willmendesneto","description":"Angular module for Page Scroll locking","archived":false,"fork":false,"pushed_at":"2023-01-07T02:39:35.000Z","size":2059,"stargazers_count":6,"open_issues_count":16,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-29T11:44:13.626Z","etag":null,"topics":["angular","hacktoberfest","lock","ng","ngx-scroll-lock","scroll"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willmendesneto.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-22T12:07:47.000Z","updated_at":"2021-08-06T22:12:17.000Z","dependencies_parsed_at":"2023-01-15T02:46:14.772Z","dependency_job_id":null,"html_url":"https://github.com/willmendesneto/ngx-scroll-lock","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/willmendesneto/ngx-scroll-lock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willmendesneto%2Fngx-scroll-lock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willmendesneto%2Fngx-scroll-lock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willmendesneto%2Fngx-scroll-lock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willmendesneto%2Fngx-scroll-lock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willmendesneto","download_url":"https://codeload.github.com/willmendesneto/ngx-scroll-lock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willmendesneto%2Fngx-scroll-lock/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268859529,"owners_count":24318970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-05T02:00:12.334Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","hacktoberfest","lock","ng","ngx-scroll-lock","scroll"],"created_at":"2024-11-13T07:43:24.941Z","updated_at":"2025-08-05T08:17:32.991Z","avatar_url":"https://github.com/willmendesneto.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NGX Scroll locker\n\n\u003e Angular module for Page Scroll locking\n\n[![Dependency Status](https://david-dm.org/willmendesneto/ngx-scroll-lock.svg)](https://david-dm.org/willmendesneto/ngx-scroll-lock)\n[![npm](https://img.shields.io/badge/stackblitz-online-orange.svg)](https://stackblitz.com/edit/ngx-scroll-lock-sample)\n\n[![NPM](https://nodei.co/npm/ngx-scroll-lock.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://npmjs.org/ngx-scroll-lock)\n[![NPM](https://nodei.co/npm-dl/ngx-scroll-lock.png?height=3\u0026months=3)](https://npmjs.org/ngx-scroll-lock)\n\n[![Build Status](https://circleci.com/gh/willmendesneto/ngx-scroll-lock.svg?style=shield)](https://circleci.com/gh/willmendesneto/ngx-scroll-lock)\n[![Coverage Status](https://coveralls.io/repos/willmendesneto/ngx-scroll-lock/badge.svg?branch=master)](https://coveralls.io/r/willmendesneto/ngx-scroll-lock?branch=master)\n[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/ngx-scroll-lock.svg)](https://bundlephobia.com/result?p=ngx-scroll-lock)\n[![npm](https://img.shields.io/npm/l/express.svg?maxAge=2592000)](/LICENSE)\n\n![ngx-scroll-lock in action](https://user-images.githubusercontent.com/1252570/50392356-e1be8780-07a1-11e9-879c-35bc1158e1d1.gif)\n\n## Why scroll lock?\n\nThe idea of this component is make the process of locking the page scroll transparent and easier. So the main point is integrate this component with other tooling process, such as:\n\n- When open a modal component\n- Open a hamburguer menu\n- Any other that you like :)\n\nIt's totally transparent for you and you can integrate easier in your application, improving your user experience 🎉\n\n- [Demo](#demo)\n- [Install](#install)\n- [Setup](#setup)\n- [Development](#development)\n- [Contribute](#contribute)\n\n## Demo\n\nTry out our [demo on Stackblitz](https://ngx-scroll-lock-sample.stackblitz.io)!\n\n## Install\n\nYou can get it on NPM installing `ngx-scroll-lock` module as a project dependency.\n\n```shell\nnpm install ngx-scroll-lock --save\n```\n\n## Setup\n\nYou'll need to add `NgxScrollLockModule` to your application module. So that, the `\u003cngx-scroll-lock\u003e` components will be accessible in your application.\n\n```typescript\n...\nimport { NgxScrollLockModule } from 'ngx-scroll-lock';\n...\n@NgModule({\n  declarations: [\n    YourAppComponent\n  ],\n  imports: [\n    ...\n    NgxScrollLockModule,\n    ...\n  ],\n  providers: [],\n  bootstrap: [YourAppComponent]\n})\n\nexport class YourAppComponent {}\n\n```\n\nAfter that, you can use the `ngx-scroll-lock` component in your templates, passing the `target` element into the component itself and/or .\n\n- `target`: DOM element to be locked. Default: `document.body`;\n- `lock`: Boolean to be changed in case a scroll lock is needed from outside `ngx-scroll-lock` component;\n\n```js\nimport { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"my-app\",\n  templateUrl: \"./app.component.html\",\n  styleUrls: [\"./app.component.css\"],\n})\nexport class AppComponent {\n  lock = false;\n  target = \"#my-element-with-scroll\";\n}\n```\n\n```html\n\u003cngx-scroll-lock [lock]=\"lock\" [target]=\"target\"\u003e\u003c/ngx-scroll-lock\u003e\n\u003cdiv id=\"my-element-with-scroll\"\u003e\u003c/div\u003e\n```\n\n\u003e Please make sure you have the `target` element available when using it.\n\n## Development\n\n### Run demo locally\n\n1. This project uses [Angular CLI](https://cli.angular.io/) as base. That means you just need to run `npm start` and access the link `http://localhost:4200` in your browser\n\n### Run tests\n\n1. Run `npm test` for run tests. In case you want to test using watch, please use `npm run tdd`\n\n### Publish\n\nthis project is using `np` package to publish, which makes things straightforward. EX: `np \u003cpatch|minor|major\u003e --contents=dist/ngx-scroll-lock`\n\n\u003e For more details, [please check np package on npmjs.com](https://www.npmjs.com/package/np)\n\n## Contribute\n\nFor any type of contribution, please follow the instructions in [CONTRIBUTING.md](https://github.com/willmendesneto/ngx-scroll-lock/blob/master/CONTRIBUTING.md) and read [CODE_OF_CONDUCT.md](https://github.com/willmendesneto/ngx-scroll-lock/blob/master/CODE_OF_CONDUCT.md) files.\n\n## Author\n\n**Wilson Mendes (willmendesneto)**\n\n- \u003chttps://twitter.com/willmendesneto\u003e\n- \u003chttp://github.com/willmendesneto\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillmendesneto%2Fngx-scroll-lock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillmendesneto%2Fngx-scroll-lock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillmendesneto%2Fngx-scroll-lock/lists"}