{"id":20105968,"url":"https://github.com/markthree/usescrollbarstyle","last_synced_at":"2025-09-20T23:33:02.410Z","repository":{"id":135417805,"uuid":"577691718","full_name":"markthree/useScrollBarStyle","owner":"markthree","description":"响应式地变换滚动条样式 (vue3)","archived":false,"fork":false,"pushed_at":"2023-01-10T05:16:05.000Z","size":10131,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-13T17:52:08.156Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/markthree.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-13T10:04:09.000Z","updated_at":"2024-03-04T06:26:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"a38e4996-9163-4b15-89c1-fb4d204359cc","html_url":"https://github.com/markthree/useScrollBarStyle","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":"dishait/vue3-exports","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2FuseScrollBarStyle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2FuseScrollBarStyle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2FuseScrollBarStyle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2FuseScrollBarStyle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markthree","download_url":"https://codeload.github.com/markthree/useScrollBarStyle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233694824,"owners_count":18715508,"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-11-13T17:48:44.188Z","updated_at":"2025-09-20T23:33:01.758Z","avatar_url":"https://github.com/markthree.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg width=\"100%\" height=\"100%\" src=\"./snapshot.gif\" /\u003e\n    \u003ch1\u003euseScrollBarStyle\u003c/h1\u003e\n    \u003cp\u003e响应式可编程的滚动条样式 (vue3)\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n## Motivation\n\n大多数人都会选择改掉 `web` 原生难看的滚动条样式，但是原生滚动条的选择器实在是复杂。所以有了这个库，当然得益于 `vue3` 的支持，一切都是响应式可编程的，例如你可以根据不同场景变换滚动条的样式，尤其是在 `web` 网站有多主题需求时，一切都会变得简单。\n\n\u003cbr /\u003e\n\n## Usage\n\n### install\n\n```shell\nnpm i use-scroll-bar-style\n```\n\n### import\n\n```html\n\u003cscript setup lang=\"ts\"\u003e\n\timport { useScrollBarStyle } from 'use-scroll-bar-style'\n\n\tconst {\n\t\twidth,\n\t\tthumbBackgroundColor,\n\t\tdarkThumbBackgroundColor\n\t\t// ... etc\n\t} = useScrollBarStyle()\n\n\twidth.value = '10px' // 宽度\n\n\tthumbBackgroundColor.value = 'red' //  thumb 背景颜色\n\n\tdarkThumbBackgroundColor.value = 'blue' // 暗黑模式下 thumb 背景颜色\n\u003c/script\u003e\n```\n\n\u003cbr /\u003e\n\n## Refs\n\n该组件由以下库搭建而成\n\n- [vite](https://cn.vitejs.dev/)\n- [vueuse](https://vueuse.org/)\n- [unocss](https://github.com/unocss/unocss)\n\n\u003cbr /\u003e\n\n## Support\n\n该库由 [vue3-exports](https://github.com/dishait/vue3-exports) 提供支持，[vue-dark-switch](https://github.com/dishait/vue-dark-switch) 提供暗黑模式下的测试。\n\n\u003cbr /\u003e\n\n## License\n\nMade with [markthree](https://github.com/markthree)\n\nPublished under [MIT License](./LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkthree%2Fusescrollbarstyle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkthree%2Fusescrollbarstyle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkthree%2Fusescrollbarstyle/lists"}