{"id":15654309,"url":"https://github.com/jossmac/react-scroll-captor","last_synced_at":"2025-04-30T22:49:05.243Z","repository":{"id":57344212,"uuid":"121006081","full_name":"jossmac/react-scroll-captor","owner":"jossmac","description":"📜 Restrict scroll events to the immediate child","archived":false,"fork":false,"pushed_at":"2018-02-23T21:00:43.000Z","size":48,"stargazers_count":27,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T22:48:53.342Z","etag":null,"topics":["react","scroll"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jossmac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-02-10T10:30:35.000Z","updated_at":"2023-03-21T05:38:58.000Z","dependencies_parsed_at":"2022-09-11T09:00:41.646Z","dependency_job_id":null,"html_url":"https://github.com/jossmac/react-scroll-captor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossmac%2Freact-scroll-captor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossmac%2Freact-scroll-captor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossmac%2Freact-scroll-captor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jossmac%2Freact-scroll-captor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jossmac","download_url":"https://codeload.github.com/jossmac/react-scroll-captor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251795386,"owners_count":21645019,"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","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":["react","scroll"],"created_at":"2024-10-03T12:50:38.112Z","updated_at":"2025-04-30T22:49:05.208Z","avatar_url":"https://github.com/jossmac.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📜 React Scroll Captor\n\nA component that confines scroll events to its immediate child. Great for dropdown menus etc.\n\n### Install\n\n```bash\nyarn add react-scroll-captor\n```\n\n### Use\n\n```jsx\nimport ScrollCaptor from 'react-scroll-captor';\n\nclass GroovyThing extends Component {\n  atBottom = () =\u003e {\n    // user has scrolled to the bottom\n  }\n  render () {\n    return (\n      \u003cScrollCaptor onBottomArrive={this.atBottom}\u003e\n        \u003cScrollableElement /\u003e\n      \u003c/ScrollCaptor\u003e\n    );\n  }\n}\n```\n\n### Props\n\n| Property         | Type       | Default    | Description |\n| ---------------- | ---------- | ---------- | ----------- |\n| `isEnabled`      | `boolean`  | `true` | Enable or disable the component. |\n| `onBottomArrive` | `function` | --     | Called when the user reaches the bottom of the scrollable element. |\n| `onBottomLeave`  | `function` | --     | Called when the user leaves the bottom of the scrollable element. |\n| `onTopArrive`    | `function` | --     | Called when the user reaches the top of the scrollable element. |\n| `onTopLeave`     | `function` | --     | Called when the user leaves the top of the scrollable element. |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjossmac%2Freact-scroll-captor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjossmac%2Freact-scroll-captor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjossmac%2Freact-scroll-captor/lists"}