{"id":21224202,"url":"https://github.com/admataz/svelte-scrollmation","last_synced_at":"2026-03-19T19:22:53.370Z","repository":{"id":47860226,"uuid":"260577840","full_name":"admataz/svelte-scrollmation","owner":"admataz","description":"Svelte component to wrap content and give it scrolling superpowers. https://scrollmation.demo.admataz.com/","archived":false,"fork":false,"pushed_at":"2022-07-21T01:22:15.000Z","size":137,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-20T09:04:53.635Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/admataz.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":"2020-05-01T23:26:00.000Z","updated_at":"2020-08-23T22:00:13.000Z","dependencies_parsed_at":"2022-09-13T18:41:50.117Z","dependency_job_id":null,"html_url":"https://github.com/admataz/svelte-scrollmation","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/admataz/svelte-scrollmation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/admataz%2Fsvelte-scrollmation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/admataz%2Fsvelte-scrollmation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/admataz%2Fsvelte-scrollmation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/admataz%2Fsvelte-scrollmation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/admataz","download_url":"https://codeload.github.com/admataz/svelte-scrollmation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/admataz%2Fsvelte-scrollmation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29589572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T16:55:40.614Z","status":"ssl_error","status_checked_at":"2026-02-18T16:55:37.558Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-11-20T22:57:21.866Z","updated_at":"2026-02-18T18:32:53.201Z","avatar_url":"https://github.com/admataz.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Svelte Scrollmation\n\nA [svelte.js](https://svelte.dev) component. Wrap you content with this, and give it reactive scrolling superpowers.\n\n## Usage in a `svelte` component: \n\n`Scrollmation` component to wrap your component\n\nEvents: \n- `next` - scroll has reached the end position - good time to trigger the next thing\n- `prev` - scroll has reached the start position - good time to trigger the previous thing\n- `home` - scroll has settled on the landing position (usually on first load)\n- `scroll` - fires while there is movement with updated position values - good to use for responsive transitions: \n\nYou could\n\n- Grow \n- Fade\n- Move item \n- Rotate item\n- Change colour\n- Trigger another animation \n- Horizontal pan\n- Zoom panorama\n- Parallax effect \n- ...\n\nIt's really up to you. \n\n\nExample: \n\n```html\n\u003cscript\u003e\n// import the component and helper functions\n  import Scrollmation, {\n    toHomeRatio,\n    toStartRatio,\n    toEndRatio,\n    toRangeRatio,\n    fullRangePx,\n    toHomePx,\n    toEndPx,\n    toStartPx\n  } from \"scrollmation\";\n\n// set some variable values to use in the render\n  let rangeRatio\n  \n// event handler\n  function onScroll({ type, detail }) {\n\t  rangeRatio = toHomeRatio(detail)\n  }\n\u003c/script\u003e\n\n\u003cstyle\u003e\n  main {\n    text-align: center;\n    height: 100%;\n  }\n\n  h1 {\n    font-size: 10em;\n  }\n\n\u003c/style\u003e\n\n\u003cmain style=\"background-color:rgba({rangeRatio*100} 0 {255-(rangeRatio*255)})\"\u003e\n  \u003cScrollmation on:scroll={onScroll}\u003e\n    \u003ch1\u003e\n      🌞\n    \u003c/h1\u003e\n  \u003c/Scrollmation\u003e\n\u003c/main\u003e\n\n```\n\n\n\n## Web Component usage\nMore limited capability - but useful for some instances. \n\nSee the example in [./public/index.html](./public/index.html)\n\n\n[License MIT](/LICENSE)\nCopyright 2020 Adam Davis\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadmataz%2Fsvelte-scrollmation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadmataz%2Fsvelte-scrollmation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadmataz%2Fsvelte-scrollmation/lists"}