{"id":15383132,"url":"https://github.com/bre97-web/scroll-button","last_synced_at":"2025-02-27T05:43:28.537Z","repository":{"id":179846630,"uuid":"664163506","full_name":"bre97-web/scroll-button","owner":"bre97-web","description":"适用于任意框架的滚动按钮，一次点击滚动到底。可选择滚动方向和速度。","archived":false,"fork":false,"pushed_at":"2023-08-13T02:22:21.000Z","size":11560,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T08:35:28.591Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://bre97-web.github.io/scroll-button/","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/bre97-web.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,"governance":null}},"created_at":"2023-07-09T05:09:03.000Z","updated_at":"2023-08-13T02:14:13.000Z","dependencies_parsed_at":"2023-08-13T02:30:15.345Z","dependency_job_id":"a86b904c-16cf-492a-a5ad-28f5fcf641ba","html_url":"https://github.com/bre97-web/scroll-button","commit_stats":null,"previous_names":["bre97-web/scroll-back-button","bre97-web/scroll-button"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bre97-web%2Fscroll-button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bre97-web%2Fscroll-button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bre97-web%2Fscroll-button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bre97-web%2Fscroll-button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bre97-web","download_url":"https://codeload.github.com/bre97-web/scroll-button/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240985903,"owners_count":19889177,"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":[],"created_at":"2024-10-01T14:35:29.178Z","updated_at":"2025-02-27T05:43:28.519Z","avatar_url":"https://github.com/bre97-web.png","language":"TypeScript","readme":"# scroll-button\n\nA lit web component. A Web Component for any framework, this component does not provide any style and structure. Please provide the structure inside the scroll-button tag. Provides the function of scrolling up and down to the bottom.\n\n**It's Web Component, work with any framkework, like react, vue, non-framkework.**\n\nSee [examples](https://bre97-web.github.io/scroll-button/).\n\n# Quick Start\n\n## Install\n\n```\nnpm i scroll-button\n```\n\n## Import\n\nimport from **index.html**\n```html\n\u003cscript src=\"./node_modules/scroll-button/scroll-button.js\"\u003e\u003c/script\u003e\n```\n\nor import from main.**js**\n```js\nimport '/scroll-button/scroll-button.js'\n```\n\n(**Recommmand**)\nor import from main.**ts**\n```ts\nimport '/scroll-button/scroll-button'\n```\n\n## Usage\n\nUsing it is as easy as using html, You can go to this site to see [examples](https://bre97-web.github.io/scroll-button/)\n\n```html\n\u003cdiv id=\"boxOne\" class=\"h-32 overflow-y-scroll\"\u003e\n    \u003cdiv class=\"h-[2000px]\"\u003e\u003c/div\u003e\n\u003c/div\u003e\n\n\u003cscroll-button direction=\"start\" speed=\"1\" step=\"0.5\" parent=\"#boxOne\"\u003e\n    \u003cbutton\u003eGo Top\u003c/button\u003e\n\u003c/scroll-button\u003e\n```\n\n# Documents\n\n|Property|Type|Default|Document|\n|:--|:-|:--|--:|\n|direction|'start' \\| 'top' \\| 'end' \\| 'bottom' \\| 'bot'|'start'|The direction of scrolling, start and top represent upward, end and bottom and bot represent downward. On some frameworks the default value may not work and a direction needs to be specified|\n|speed|number|1|The speed of scrolling, usually you will prefer to set the parameter to 4 or 8, so that it will scroll faster|\n|step|number|0.5|step represents the step size, which is the distance scrolled each time|\n|parent|string|document.documentElement|It represents a container with scroll bars|","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbre97-web%2Fscroll-button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbre97-web%2Fscroll-button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbre97-web%2Fscroll-button/lists"}