{"id":14962676,"url":"https://github.com/valmisson/svelte-scrolling","last_synced_at":"2025-09-10T01:35:06.463Z","repository":{"id":47498710,"uuid":"348534883","full_name":"valmisson/svelte-scrolling","owner":"valmisson","description":"Lightweight Svelte plugin to scroll to given elements with smooth animations","archived":false,"fork":false,"pushed_at":"2024-12-03T20:28:59.000Z","size":370,"stargazers_count":58,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-20T22:40:49.432Z","etag":null,"topics":["anchor","animation","navigation","onepage","scroll","scrollto","svelte3","sveltejs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/svelte-scrolling","language":"TypeScript","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/valmisson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-17T00:45:46.000Z","updated_at":"2025-05-12T17:49:55.000Z","dependencies_parsed_at":"2023-01-19T06:45:53.698Z","dependency_job_id":"ebbc445f-8b1e-42ca-a48a-768ade16db34","html_url":"https://github.com/valmisson/svelte-scrolling","commit_stats":{"total_commits":109,"total_committers":5,"mean_commits":21.8,"dds":0.04587155963302747,"last_synced_commit":"f2fde2ab8906e081a709687c277ec2a741ebb5da"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/valmisson/svelte-scrolling","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valmisson%2Fsvelte-scrolling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valmisson%2Fsvelte-scrolling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valmisson%2Fsvelte-scrolling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valmisson%2Fsvelte-scrolling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valmisson","download_url":"https://codeload.github.com/valmisson/svelte-scrolling/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valmisson%2Fsvelte-scrolling/sbom","scorecard":{"id":915399,"data":{"date":"2025-08-11","repo":{"name":"github.com/valmisson/svelte-scrolling","commit":"bf049d67ca423d635ac9e761ec512fc500abe5b4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":1,"reason":"Found 3/30 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T20:46:54.284Z","repository_id":47498710,"created_at":"2025-08-24T20:46:54.284Z","updated_at":"2025-08-24T20:46:54.284Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274396557,"owners_count":25277394,"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","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["anchor","animation","navigation","onepage","scroll","scrollto","svelte3","sveltejs"],"created_at":"2024-09-24T13:30:21.388Z","updated_at":"2025-09-10T01:35:06.437Z","avatar_url":"https://github.com/valmisson.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Svelte Scrolling\n\n[![npm][npm-shields]](https://www.npmjs.com/package/svelte-scrolling)\n[![license][license-shields]](https://github.com/valmisson/svelte-scrolling/blob/main/LICENSE)\n\nScroll to given elements with smooth animation.\n\n## Install\n```bash\nyarn add svelte-scrolling\n```\n\n## Usage\n\n```html\n\u003cscript\u003e\n  import { scrollTo, scrollRef, scrollTop } from 'svelte-scrolling'\n\u003c/script\u003e\n\n\u003cnav\u003e\n  \u003ca use:scrollTo={'home'}\u003eHome\u003c/a\u003e\n  \u003ca use:scrollTo={'about'}\u003eAbout\u003c/a\u003e\n  \u003ca use:scrollTo={{ ref: 'blog', duration: 1000 }}\u003eBlog\u003c/a\u003e\n\u003c/nav\u003e\n\n\u003csection use:scrollRef={'home'}\u003e\u003c/section\u003e\n\u003csection id=\"about\"\u003e\u003c/section\u003e\n\u003csection use:scrollRef={'blog'}\u003e\u003c/section\u003e\n\n\u003cScrollTop\u003e\n  \u003cbutton on:click={() =\u003e scrollTop()}\u003eGo to top\u003c/button\u003e\n\u003c/ScrollTop\u003e\n```\n\n## Actions\n\n#### `scrollTo={reference | options}`\n\nThis action listens for click (touchstart) events and scrolls to elements with smooth animation. The element to scroll to must be referenced using the `scrollRef` action or `id`.\n\nAccepts as parameter only the element reference or all global options:\n\n- `ref`: Element reference.\n\n*To set the global options, the `ref` property is required*\n\n#### `scrollRef={reference}`\n\nThis action adds a reference to the elements that `scrollTo` should scroll.\n\nAccepts as parameter a string with the name to reference the element\n\n## Functions\n\n#### `scrollTop(options?)`\n\nScroll to the top of the page\n\n#### `scrollBottom(options?)`\n\nScroll to the end of the page\n\n#### `scrollLeft(options?)`\n\nScroll to the end of left the page\n\n#### `scrollRight(options?)`\n\nScroll to the end of right the page\n\n#### `scrollElement(reference, options?)`\n\nScroll to element with smooth animation.\n\n#### `scrollPosition(position, options?)`\n\nScroll to a position on the page\n\n## API\n\n### Global Options\n\n| Property | Default | Description |\n|:--------:|:-------:|:-----------:|\n| `duration` | `500` | Duration (in milliseconds) of the animation. |\n| `offset` | `0` | Offset that should be applied when scrolling. |\n| `easing` | `cubicInOut` | Easing function to be used when animating. Use any easing from [`svelte/easing`][svelte-easing] or a custom easing function. |\n| `passive` | `false` | A boolean value that, if true, indicates that the function specified by listener will never call preventDefault(). |\n| `onStart` | `noop` | A callback function that should be called when scrolling has started. Receives the element, offset, duration and endPosition as a parameter. |\n| `onDone` | `noop` | A callback function that should be called when scrolling has started. Receives the element, offset, duration and endPosition as a parameter. |\n\n### Override global options\n\n```html\n\u003cscript\u003e\n  import { setGlobalOptions } from 'svelte-scrolling'\n\n  setGlobalOptions({\n    duration: 800\n  })\n\u003c/script\u003e\n```\n\n## License\n[MIT](LICENSE)\n\nCopyright (c) 2021-present, Valmisson Grizorte\n\n\n[npm-shields]: https://img.shields.io/npm/v/svelte-scrolling.svg\n[license-shields]: https://img.shields.io/badge/license-MIT-green\n[svelte-easing]: https://svelte.dev/docs/svelte/svelte-easing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalmisson%2Fsvelte-scrolling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalmisson%2Fsvelte-scrolling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalmisson%2Fsvelte-scrolling/lists"}