{"id":16611018,"url":"https://github.com/lucas-labs/vue3-vsl","last_synced_at":"2025-07-25T09:36:58.206Z","repository":{"id":57700077,"uuid":"502738679","full_name":"lucas-labs/vue3-vsl","owner":"lucas-labs","description":"📜 Vuejs 3 virtual scroll list","archived":false,"fork":false,"pushed_at":"2022-06-23T11:05:28.000Z","size":173,"stargazers_count":7,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-05T11:37:51.931Z","etag":null,"topics":["infinite-scroller","scroller","typescript","virtual-list","virtual-scroll","virtual-scroller","vuejs3"],"latest_commit_sha":null,"homepage":"","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/lucas-labs.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":"2022-06-12T22:07:46.000Z","updated_at":"2024-04-16T04:14:13.000Z","dependencies_parsed_at":"2022-09-26T21:10:40.410Z","dependency_job_id":null,"html_url":"https://github.com/lucas-labs/vue3-vsl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucas-labs%2Fvue3-vsl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucas-labs%2Fvue3-vsl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucas-labs%2Fvue3-vsl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucas-labs%2Fvue3-vsl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucas-labs","download_url":"https://codeload.github.com/lucas-labs/vue3-vsl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219868636,"owners_count":16555683,"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":["infinite-scroller","scroller","typescript","virtual-list","virtual-scroll","virtual-scroller","vuejs3"],"created_at":"2024-10-12T01:34:26.024Z","updated_at":"2024-10-12T01:34:26.619Z","avatar_url":"https://github.com/lucas-labs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"./logo.svg\" height=\"120\"\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cstrong\u003e\n🔎 \u003ccode\u003e@lucas-labs/vue3-vsl\u003c/code\u003e (virtual-scroll-list) is a Vuejs 3 component plugin. Heavily based on \u003ca href=\"https://github.com/tangbc/vue-virtual-scroll-list\"\u003etangbc/vue-virtual-scroll-list\u003c/a\u003e. Basically the same but ported to Vuejs 3 + typescript + Composition API.\n\u003c/strong\u003e\n\u003c/p\u003e\n\n## Install\n\n### npm\n```bash\nnpm i @lucas-labs/vue3-vsl\n```\n\n### pnpm\n```bash\npnpm i @lucas-labs/vue3-vsl\n```\n\n### yarn\n```bash\nyarn add @lucas-labs/vue3-vsl\n```\n\n## Usage\n\n```vue\n\u003ctemplate\u003e\n    \u003cheader\u003ehello!\u003c/header\u003e\n\n    \u003cvirtual-scroller :data-key=\"'id'\" :data-sources=\"users\" @tobottom=\"bottom\"\u003e\n        \u003ctemplate #header\u003e\n            \u003cdiv class=\"list-header\"\u003e...\u003c/div\u003e\n        \u003c/template\u003e\n\n        \u003ctemplate v-slot=\"{ item, index }\"\u003e\n            \u003cdiv class=\"list-item\"\u003e\n                \u003cdiv\u003e#{{ index }}\u003c/div\u003e\n                \u003cdiv\u003e{{ item.id }} | {{ item.username }}\u003c/div\u003e\n            \u003c/div\u003e\n        \u003c/template\u003e\n\n        \u003ctemplate #footer\u003e\n            \u003cdiv class=\"list-footer\"\u003e...\u003c/div\u003e\n        \u003c/template\u003e\n    \u003c/virtual-scroller\u003e\n\u003c/template\u003e\n\n\u003cscript setup lang=\"ts\"\u003e\n    import { ref } from 'vue';\n    import { VirtualScroller } from '@lucas-labs/vue3-vsl';\n\n    const users = ref\u003c{ id: number | string; username: string }[]\u003e([]);\n\n    const fetchUsers = () =\u003e {\n        users.value = ...\n    };\n\n    const bottom = () =\u003e {\n        // we reached the bottom of the list...\n        // fetch more users maybe?\n        ...\n    };\n\n    fetchUsers();\n\u003c/script\u003e\n```\n\n### Use globally\n\n```typescript\n// main.ts/main.js\nimport { createApp } from 'vue'\nimport App from './App.vue'\n\n// import the plugin\nimport VirtualScrollerPlugin from '@lucas-labs/vue3-vsl';\n\nconst app = createApp(App);\n\n// use the plugin to make it \n// available in all your components\napp.use(VirtualScrollerPlugin);\napp.mount('#app');\n```\n\n# TODO\n\n- [ ] Add tests!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucas-labs%2Fvue3-vsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucas-labs%2Fvue3-vsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucas-labs%2Fvue3-vsl/lists"}