{"id":13808711,"url":"https://github.com/aholachek/scrollbounce","last_synced_at":"2025-03-21T02:33:23.983Z","repository":{"id":44057264,"uuid":"216831507","full_name":"aholachek/scrollbounce","owner":"aholachek","description":"Add a subtle bounce effect on mobile when the user scrolls (WIP)","archived":false,"fork":false,"pushed_at":"2022-12-10T06:26:49.000Z","size":1096,"stargazers_count":17,"open_issues_count":11,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-12T05:47:35.767Z","etag":null,"topics":["animation","mobile-web","scroll","spring"],"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/aholachek.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":"2019-10-22T14:15:55.000Z","updated_at":"2022-07-09T04:46:33.000Z","dependencies_parsed_at":"2023-01-26T00:00:48.068Z","dependency_job_id":null,"html_url":"https://github.com/aholachek/scrollbounce","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aholachek%2Fscrollbounce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aholachek%2Fscrollbounce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aholachek%2Fscrollbounce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aholachek%2Fscrollbounce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aholachek","download_url":"https://codeload.github.com/aholachek/scrollbounce/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221811380,"owners_count":16884305,"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":["animation","mobile-web","scroll","spring"],"created_at":"2024-08-04T01:01:49.926Z","updated_at":"2024-10-28T09:12:33.497Z","avatar_url":"https://github.com/aholachek.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# scrollbounce\n[![Minified \u0026 Gzipped size](https://badgen.net/bundlephobia/minzip/scrollbounce)](https://bundlephobia.com/result?p=scrollbounce)\n[![npm version](https://badgen.net/npm/v/scrollbounce)](https://npmjs.org/package/scrollbounce \"View this project on npm\")\n\n\n\u003ca href=\"https://codesandbox.io/s/scrollbounce-demo-ofxn8\"\u003e\n\u003cimg src=\"./example.gif\" alt=\"scroll example\" height=\"300px\"\u003e\n\u003c/a\u003e\n\n[➡ Live demo on CodeSandbox](https://codesandbox.io/s/scrollbounce-demo-ofxn8)\n\n\n## Quickstart\n\n`npm install scrollbounce`\n\nor\n\n`yarn add scrollbounce`\n\n### 1. Give animated elements unique `data-bounce-id` attributes:\n\n```html\n\u003cul\u003e\n  \u003cli data-bounce-id=\"1\"\u003e\u003c/li\u003e\n  \u003cli data-bounce-id=\"2\"\u003e\u003c/li\u003e\n  \u003cli data-bounce-id=\"3\"\u003e\u003c/li\u003e\n\u003c/ul\u003e\n```\n\n### 2. Init the animation:\n\n```js\nimport bounce from 'scrollbounce'\n\nconst stopBounce = bounce()\n\n// if you want to remove the effect later:\nstopBounce()\n```\n\n## Options\n\nThe default effect is pretty subtle. To crank it up you can pass in an `effectMultiplier` option.\n\n```js\nbounce({ effectMultiplier: 3 })\n```\n\n## Coming soon\n\n- [ ] Improved edge case handling\n- [ ] Performance optimizations\n- [ ] More spring customization\n- [ ] Support horizontal scroll\n\n## Details\n\n- [Inspired by the \"BouncyLayout\" library for iOS ](https://github.com/roberthein/BouncyLayout)\n- This library is targeted towards touch devices and won't have any effect on desktop.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faholachek%2Fscrollbounce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faholachek%2Fscrollbounce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faholachek%2Fscrollbounce/lists"}