{"id":13938076,"url":"https://github.com/BosNaufal/vue2-scrollbar","last_synced_at":"2025-07-20T00:31:52.808Z","repository":{"id":48000661,"uuid":"77729669","full_name":"BosNaufal/vue2-scrollbar","owner":"BosNaufal","description":"The Simplest Pretty Scroll Area Component with custom scrollbar for Vue 2. https://bosnaufal.github.io/vue2-scrollbar","archived":false,"fork":false,"pushed_at":"2022-12-07T01:06:12.000Z","size":960,"stargazers_count":233,"open_issues_count":35,"forks_count":79,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-07T11:15:18.341Z","etag":null,"topics":["custom-scrollbar","scrollbar","vue","vue-scrollbar","vue2","vuejs2"],"latest_commit_sha":null,"homepage":null,"language":"Vue","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/BosNaufal.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":"2016-12-31T07:10:17.000Z","updated_at":"2025-03-21T06:50:03.000Z","dependencies_parsed_at":"2023-01-24T06:01:05.002Z","dependency_job_id":null,"html_url":"https://github.com/BosNaufal/vue2-scrollbar","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/BosNaufal/vue2-scrollbar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BosNaufal%2Fvue2-scrollbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BosNaufal%2Fvue2-scrollbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BosNaufal%2Fvue2-scrollbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BosNaufal%2Fvue2-scrollbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BosNaufal","download_url":"https://codeload.github.com/BosNaufal/vue2-scrollbar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BosNaufal%2Fvue2-scrollbar/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266048540,"owners_count":23868739,"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":["custom-scrollbar","scrollbar","vue","vue-scrollbar","vue2","vuejs2"],"created_at":"2024-08-07T23:04:13.181Z","updated_at":"2025-07-20T00:31:47.793Z","avatar_url":"https://github.com/BosNaufal.png","language":"Vue","funding_links":[],"categories":["Vue"],"sub_categories":[],"readme":"# Vue 2  Scrollbar\n\nThe Simplest Scroll Area Component with custom scrollbar for [Vue 2](https://vuejs.or). It's based on [react-scrollbar](https://github.com/BosNaufal/react-scrollbar). All animation, Height and Width are pure CSS, So it's TOTALLY **CUSTOMIZABLE** and **RESPONSIVE**! YEAH!.\n\n[DEMO](https://bosnaufal.github.io/vue2-scrollbar)\n\n## Install\nYou can import [vue-scrollbar.vue](./src/js/components/vue-scrollbar.vue) to your vue component file like [this](./src/js/components/app.vue) and process it with your preprocessor.\n\n\nYou can install it via NPM\n```bash\nnpm install vue2-scrollbar\n```\n\nOr Just put it after Vue JS~\n```html\n\u003cscript src=\"https://vuejs.org/js/vue.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"./dist/vue2-scrollbar.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  // Don't Forget to register it\n  new Vue({\n    components: {\n      scrollbar: Vue2Scrollbar\n    }\n  });\n\u003c/script\u003e\n```\n\n\n## Import Style\nDon't forget to import vue 2 css. You can link it via html\n```html\n\u003clink rel=\"stylesheet\" href=\"vue2-scrollbar/dist/style/vue2-scrollbar.css\"\u003e\n```\n\nOr You can import it using commonJS\n\n```javascript\nrequire('vue2-scrollbar/style/vue2-scrollbar.css')\n```\n\nIts style is very customizable. You can put any CSS over it. And You can add custom class via its prop.\n\n\n## Import Module\n```javascript\nimport ScrollBar from 'vue2-scrollbar'\n// Or\nvar ScrollBar = require('vue2-scrollbar');\n```\n\n\n## Usage\n```html\n\n\u003ctemplate\u003e\n  \u003cdiv\u003e\n    \u003cvue-scrollbar classes=\"my-scrollbar\" ref=\"Scrollbar\"\u003e\n      \u003cdiv class=\"scroll-me\"\u003e\n        \u003cdiv class=\"kolom\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"kolom\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"kolom\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"kolom\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"kolom\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"kolom\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"kolom\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"kolom\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"kolom\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"kolom\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"kolom\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"kolom\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"kolom\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"kolom\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"kolom\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"kolom\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"clearfix\"\u003e\u003c/div\u003e\n      \u003c/div\u003e\n    \u003c/vue-scrollbar\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\n\n  import VueScrollbar from 'vue2-scrollbar';\n  require(\"vue2-scrollbar/style/vue2-scrollbar.css\")\n\n  // It's required to set min height of the scrollbar wrapper\n  require(\"./your/custom/style/app.css\")\n\n  export default {\n    components: { VueScrollbar },\n  };\n\n\u003c/script\u003e\n\n```\n\n\n## Props\n##### clasess (String)\nJust the ordinary class name for styling the wrapper. So, It's TOTALLY **CUSTOMIZABLE!**\n```css\n/*The Wrapper*/\n.my-scrollbar{\n  width: 35%;\n  min-width: 300px;\n  max-height: 450px;\n}\n\n/*The Content*/\n.scroll-me{\n  min-width: 750px;\n}\n```\n\n\n##### style (Object)\nIf you prefer to use inline style to styling the scrollbar, you can pass the styling object to this props.\n\n```javascript\nthis.styling = {\n\n  /* Scrollbar */\n  scrollbar: {\n    width: \"35%\",\n    minWidth: \"300px\",\n    maxHeight: \"450px\"\n  },\n\n}\n```\n\n```html\n\u003cvue-scrollbar :style=\"styling.scrollbar\"\u003e\u003c/vue-scrollbar\u003e\n```\n\n##### speed (Number)\nThe wheel step in pixel. The default is 53 pixel per wheel.\n\n\n##### onMaxScroll (type: Function, return: Object)\nApplied when the scrollbar in the max vertical or max horizontal scrolling. Make a possibility to add some *load more* feature or infinite scroll\n```javascript\n// Examples\nhandleMaxScroll(direction) {\n  console.log(direction);\n}\n```\n```html\n\u003cvue-scrollbar :onMaxScroll=\"handleMaxScroll\"\u003e\u003c/vue-scrollbar\u003e\n```\n\n\n\n## Methods\nYou can do some methods by accessing the component via javascript.\n```javascript\nthis.$refs.scrollbar.someMethod()\n```\n\n##### scrollToY(y)\nTo scroll the scrollbar to the Y\n```javascript\n// Examples\nsomeMethod() {\n  this.$refs.Scrollbar.scrollToY(100)\n}\n```\n\n##### scrollToX(x)\nTo scroll the scrollbar to the X\n```javascript\n// Examples\nsomeMethod() {\n  this.$refs.Scrollbar.scrollToX(100)\n}\n```\n\n## Thank You for Making this useful~\n\n## Let's talk about some projects with me\nJust Contact Me At:\n- Email: [bosnaufalemail@gmail.com](mailto:bosnaufalemail@gmail.com)\n- Skype Id: bosnaufal254\n- twitter: [@BosNaufal](https://twitter.com/BosNaufal)\n\n## License\n[MIT](http://opensource.org/licenses/MIT)\nCopyright (c) 2016 - forever Naufal Rabbani\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBosNaufal%2Fvue2-scrollbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBosNaufal%2Fvue2-scrollbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBosNaufal%2Fvue2-scrollbar/lists"}