{"id":15761584,"url":"https://github.com/finnfiddle/react-scroll-area","last_synced_at":"2026-01-20T04:31:59.435Z","repository":{"id":57344206,"uuid":"63636217","full_name":"finnfiddle/react-scroll-area","owner":"finnfiddle","description":"React component that scrolls to child refs programmatically","archived":false,"fork":false,"pushed_at":"2016-07-18T20:54:57.000Z","size":7,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-11T11:17:42.973Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/finnfiddle.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":"2016-07-18T20:53:32.000Z","updated_at":"2016-10-21T19:30:06.000Z","dependencies_parsed_at":"2022-09-11T08:41:51.839Z","dependency_job_id":null,"html_url":"https://github.com/finnfiddle/react-scroll-area","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/finnfiddle%2Freact-scroll-area","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnfiddle%2Freact-scroll-area/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnfiddle%2Freact-scroll-area/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/finnfiddle%2Freact-scroll-area/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/finnfiddle","download_url":"https://codeload.github.com/finnfiddle/react-scroll-area/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247623005,"owners_count":20968574,"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":[],"created_at":"2024-10-04T11:03:07.209Z","updated_at":"2026-01-20T04:31:59.422Z","avatar_url":"https://github.com/finnfiddle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Scroll Area\n\n```bash\nnpm install react-scroll-area\n```\n\nA React component that enables you to programmatically scroll to child components within it.\n\n## Example Usage\n\n```javascript\nimport React, { Component } from 'react';\nimport ReactDOM from 'react-dom';\nimport ScrollArea from 'react-scroll-area';\n\nclass MyComponent extends Component {\n\n  componentDidMount() {\n    const scrollarea = ReactDOM.findDOMNode(this.refs.scrollarea);\n\n    setTimeout(() =\u003e {\n      scrollarea.scrollTo(this.refs.first_target);\n    }, 3000);\n\n    setTimeout(() =\u003e {\n      scrollarea.scrollTo(this.refs.second_target, {\n        offsetTop: -100,\n        offsetLeft: 0,\n        duration: 2000,\n        delay: 500,\n        tick: 50,\n      });\n    }, 6000);\n  }\n\n  render() {\n    return (\n      \u003cScrollArea style={{width: 400, height: 400}} ref='scrollarea'\u003e\n        \u003ch2 ref=\"first_target\" style={{marginBottom: 500}}\u003eFirst Target\u003c/h2\u003e\n        \u003ch2 ref=\"second_target\"\u003eSecond Target\u003c/h2\u003e\n      \u003c/ScrollArea\u003e\n    );\n  }\n}\n\n```\n\n## Options\n\nPassed as second argument to `scrollTo` method.\n\n| Prop Name  | Description                                                                | Default Value |\n|------------|----------------------------------------------------------------------------|---------------|\n| offsetTop  | desired vertical offset of scroll container from target at end of scroll   | 0             |\n| offsetLeft | desired horizontal offset of scroll container from target at end of scroll | 0             |\n| duration   | duration of scroll                                                         | 200           |\n| delay      | delay before starting to scroll                                            | 0             |\n| tick       | period between each tick of scroll animation                               | 30            |\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinnfiddle%2Freact-scroll-area","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffinnfiddle%2Freact-scroll-area","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffinnfiddle%2Freact-scroll-area/lists"}