{"id":15648944,"url":"https://github.com/andarist/use-smooth-scroll","last_synced_at":"2025-04-16T04:44:32.970Z","repository":{"id":57388391,"uuid":"156266164","full_name":"Andarist/use-smooth-scroll","owner":"Andarist","description":"React hook which gives a smooth scrolling function.","archived":false,"fork":false,"pushed_at":"2019-05-06T11:07:38.000Z","size":21,"stargazers_count":41,"open_issues_count":4,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-02T00:09:42.522Z","etag":null,"topics":["hook","hooks","react","reactjs","scroll"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Andarist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-05T18:48:07.000Z","updated_at":"2022-08-23T14:06:21.000Z","dependencies_parsed_at":"2022-09-09T18:12:39.425Z","dependency_job_id":null,"html_url":"https://github.com/Andarist/use-smooth-scroll","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andarist%2Fuse-smooth-scroll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andarist%2Fuse-smooth-scroll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andarist%2Fuse-smooth-scroll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Andarist%2Fuse-smooth-scroll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Andarist","download_url":"https://codeload.github.com/Andarist/use-smooth-scroll/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249197567,"owners_count":21228592,"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":["hook","hooks","react","reactjs","scroll"],"created_at":"2024-10-03T12:27:10.092Z","updated_at":"2025-04-16T04:44:32.944Z","avatar_url":"https://github.com/Andarist.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# use-smooth-scroll\n\nReact hook which gives a smooth scrolling function.\n\n## Example ([Codesandbox](https://codesandbox.io/s/github/Andarist/use-smooth-scroll/tree/master/examples/simple))\n\n```js\nconst Example = () =\u003e {\n  const ref = React.useRef()\n  const scrollTo = useSmoothScroll('x', ref)\n\n  return (\n    \u003c\u003e\n      \u003cbutton onClick={() =\u003e scrollTo(getRandomScrollTarget(ref.current))}\u003e\n        Click me\n      \u003c/button\u003e\n      \u003cCarousel innerRef={ref}\u003e\n        {range(100).map(i =\u003e (\n          \u003cCard key={i} /\u003e\n        ))}\n      \u003c/Carousel\u003e\n    \u003c/\u003e\n  )\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandarist%2Fuse-smooth-scroll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandarist%2Fuse-smooth-scroll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandarist%2Fuse-smooth-scroll/lists"}