{"id":19908719,"url":"https://github.com/ninjabonsai/motion-scroll","last_synced_at":"2025-11-26T00:05:16.854Z","repository":{"id":57303089,"uuid":"169109843","full_name":"ninjabonsai/motion-scroll","owner":"ninjabonsai","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-02T18:37:31.000Z","size":218,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T22:20:06.777Z","etag":null,"topics":["easing","es6","javascript","scrolling"],"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/ninjabonsai.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":"2019-02-04T16:31:34.000Z","updated_at":"2022-12-02T22:27:42.000Z","dependencies_parsed_at":"2023-02-01T07:35:14.558Z","dependency_job_id":null,"html_url":"https://github.com/ninjabonsai/motion-scroll","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/ninjabonsai%2Fmotion-scroll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninjabonsai%2Fmotion-scroll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninjabonsai%2Fmotion-scroll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninjabonsai%2Fmotion-scroll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ninjabonsai","download_url":"https://codeload.github.com/ninjabonsai/motion-scroll/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241335595,"owners_count":19946086,"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":["easing","es6","javascript","scrolling"],"created_at":"2024-11-12T21:13:04.126Z","updated_at":"2025-11-26T00:05:16.823Z","avatar_url":"https://github.com/ninjabonsai.png","language":"JavaScript","readme":"# motion-scroll\nscroll to a position or an element with easing\n## Installation\n```\nnpm install motion-scroll es6-easing\n```\nes6 easing documentation can be found here..  \nhttps://github.com/ninjabonsai/es6-easing\n## Basic usage\n### scroll to top of page\n```javascript\nimport MotionScroll from 'motion-scroll';\nimport { easeInQuadOutExpo } from 'es6-easing';\n\n// scrolls to the top of the page at 2000px per second easing out\nMotionScroll.scroll( {\n    scrollTo: 0,\n    speed: 2000,\n    easing: easeInQuadOutExpo,\n} );\n```\n### scroll to a child element's position\n```javascript\nMotionScroll.scroll( {\n    scrollTo: document.querySelector( '#foo' ),\n} );\n```\n### scroll an element instead of the window\n```javascript\nMotionScroll.scroll( {\n    element: document.querySelector( '#bar' ),\n} );\n```\n### Config defaults\n```javascript\nMotionScroll.scroll( {\n    element: document.documentElement, // element to scroll\n    axis: 'y', // scroll on the x or y axis ie- horizontal or vertical scrolling\n    scrollTo: 0, // number or dom element\n    speed: 2000, // speed in pixels per second\n    easing: null, // if no easing function is provided animation will be linear\n    callBack: null, // function to call when scrolling is complete\n    delay: 0, // delay in seconds until scrolling begins\n    force: false, // prevent mousewheel interaction from cancelling scroll\n    minScrollTime: 0, // in seconds\n    maxScrollTime: 10, // in seconds\n} );\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninjabonsai%2Fmotion-scroll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fninjabonsai%2Fmotion-scroll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninjabonsai%2Fmotion-scroll/lists"}