{"id":15673809,"url":"https://github.com/jaydenseric/scroll-animator","last_synced_at":"2025-05-07T09:06:37.172Z","repository":{"id":62354870,"uuid":"63121359","full_name":"jaydenseric/scroll-animator","owner":"jaydenseric","description":"Smart, lightweight functions to animate browser scroll.","archived":false,"fork":false,"pushed_at":"2022-09-13T05:12:01.000Z","size":118,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-07T09:06:27.667Z","etag":null,"topics":["esm","maintained","mjs","node","npm"],"latest_commit_sha":null,"homepage":"https://npm.im/scroll-animator","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/jaydenseric.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":".github/funding.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"jaydenseric"}},"created_at":"2016-07-12T02:56:35.000Z","updated_at":"2024-04-11T19:59:38.000Z","dependencies_parsed_at":"2022-10-31T10:47:42.212Z","dependency_job_id":null,"html_url":"https://github.com/jaydenseric/scroll-animator","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/jaydenseric%2Fscroll-animator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaydenseric%2Fscroll-animator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaydenseric%2Fscroll-animator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaydenseric%2Fscroll-animator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaydenseric","download_url":"https://codeload.github.com/jaydenseric/scroll-animator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252847491,"owners_count":21813453,"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":["esm","maintained","mjs","node","npm"],"created_at":"2024-10-03T15:42:12.346Z","updated_at":"2025-05-07T09:06:37.141Z","avatar_url":"https://github.com/jaydenseric.png","language":"JavaScript","readme":"# scroll-animator\n\nSmart, lightweight functions to animate browser scroll.\n\n- Scroll the page or a specific element.\n- Scroll vertically and horizontally.\n- Scroll to a target element or an arbitrary position, with an optional offset.\n- Scroll animations can be interrupted by the user or other scripts (no “fighting” animations).\n- Scroll animations adapt to a moving target; handy when loading affects layout.\n- Intuitive [`easeInOutCubic`](https://easings.net/#easeInOutCubic) animation timing; a soft acceleration and deceleration.\n- \u003c 1 kB bundle size, tested.\n- SSR friendly.\n\n## Installation\n\nFor [Node.js](https://nodejs.org), to install [`scroll-animator`](https://npm.im/scroll-animator) with [npm](https://npmjs.com/get-npm), run:\n\n```sh\nnpm install scroll-animator\n```\n\nFor [Deno](https://deno.land) and browsers, an example import map:\n\n```json\n{\n  \"imports\": {\n    \"scroll-animator/\": \"https://unpkg.com/scroll-animator@4.0.0/\"\n  }\n}\n```\n\n## Requirements\n\nSupported runtime environments:\n\n- [Node.js](https://nodejs.org) versions `^14.17.0 || ^16.0.0 || \u003e= 18.0.0`.\n- [Deno](https://deno.land).\n- Browsers matching the [Browserslist](https://browsersl.ist) query [`\u003e 0.5%, not OperaMini all, not dead`](https://browsersl.ist/?q=%3E+0.5%25%2C+not+OperaMini+all%2C+not+dead).\n\nConsider polyfilling:\n\n- [`document.scrollingElement`](https://developer.mozilla.org/en-US/docs/Web/API/Document/scrollingElement)\n- [`window.requestAnimationFrame`](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame)\n\nNon [Deno](https://deno.land) projects must configure [TypeScript](https://typescriptlang.org) to use types from the ECMAScript modules that have a `// @ts-check` comment:\n\n- [`compilerOptions.allowJs`](https://typescriptlang.org/tsconfig#allowJs) should be `true`.\n- [`compilerOptions.maxNodeModuleJsDepth`](https://typescriptlang.org/tsconfig#maxNodeModuleJsDepth) should be reasonably large, e.g. `10`.\n- [`compilerOptions.module`](https://typescriptlang.org/tsconfig#module) should be `\"node16\"` or `\"nodenext\"`.\n\n## Exports\n\nThe [npm](https://npmjs.com) package [`scroll-animator`](https://npm.im/scroll-animator) features [optimal JavaScript module design](https://jaydenseric.com/blog/optimal-javascript-module-design). It doesn’t have a main index module, so use deep imports from the ECMAScript modules that are exported via the [`package.json`](./package.json) field [`exports`](https://nodejs.org/api/packages.html#exports):\n\n- [`animateScroll.mjs`](./animateScroll.mjs)\n- [`scrollToElement.mjs`](./scrollToElement.mjs)\n","funding_links":["https://github.com/sponsors/jaydenseric"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaydenseric%2Fscroll-animator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaydenseric%2Fscroll-animator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaydenseric%2Fscroll-animator/lists"}