{"id":20298213,"url":"https://github.com/993576769/virtual-list","last_synced_at":"2026-02-08T04:33:37.092Z","repository":{"id":259811588,"uuid":"869408049","full_name":"993576769/virtual-list","owner":"993576769","description":"Virtual list component for Vue3","archived":false,"fork":false,"pushed_at":"2025-01-08T16:14:52.000Z","size":243,"stargazers_count":0,"open_issues_count":10,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-22T22:03:20.761Z","etag":null,"topics":["typescript","virtual-list","vite","vue","vue3","vue3-component","vuejs"],"latest_commit_sha":null,"homepage":"https://993576769.github.io/virtual-list/","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/993576769.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-10-08T08:44:54.000Z","updated_at":"2024-10-28T05:53:30.000Z","dependencies_parsed_at":"2024-10-28T05:35:29.834Z","dependency_job_id":"3e305ff2-1604-4294-bfb3-ab552aca246b","html_url":"https://github.com/993576769/virtual-list","commit_stats":null,"previous_names":["993576769/virtual-list"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/993576769/virtual-list","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/993576769%2Fvirtual-list","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/993576769%2Fvirtual-list/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/993576769%2Fvirtual-list/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/993576769%2Fvirtual-list/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/993576769","download_url":"https://codeload.github.com/993576769/virtual-list/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/993576769%2Fvirtual-list/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29220513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T03:18:47.732Z","status":"ssl_error","status_checked_at":"2026-02-08T03:15:31.985Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["typescript","virtual-list","vite","vue","vue3","vue3-component","vuejs"],"created_at":"2024-11-14T16:07:28.042Z","updated_at":"2026-02-08T04:33:37.076Z","avatar_url":"https://github.com/993576769.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Virtual List Component Documentation\n\n[![Build](https://github.com/993576769/virtual-list/actions/workflows/build.yml/badge.svg)](https://github.com/993576769/virtual-list/actions/workflows/build.yml)\n[![Publish](https://github.com/993576769/virtual-list/actions/workflows/publish.yml/badge.svg)](https://github.com/993576769/virtual-list/actions/workflows/publish.yml)\n\n## Demo\n\n[https://993576769.github.io/virtual-list/](https://993576769.github.io/virtual-list/)\n\n## Installation\n\n```bash\nnpm install @a993576769/virtual-list\n```\n\n## Virtual List Component\n\n### Props\n\n| Prop Name | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `items` | `Array\u003cT\u003e` | Required | Array of items to be rendered |\n| `itemHeight` | `Number` | 48 | Height of each item, if `fixedHeight` is true, this value will be ignored |\n| `buffer` | `Number` | 0 | Number of items to render outside the visible area |\n| `keyField` | `keyof T` | 'id' | Unique key field for each item |\n| `topThreshold` | `Number` | 50 | Threshold for triggering the `topArrived` event |\n| `bottomThreshold` | `Number` | 50 | Threshold for triggering the `bottomArrived` event |\n| `initialPosition` | `'top' \\| 'bottom' \\| T[keyof T]` | 'bottom' | Initial scroll position |\n\n### Events\n\n| Event Name | Parameters | Description |\n|------------|------------|-------------|\n| `topArrived` | None | Triggered when scrolling reaches the top threshold |\n| `bottomArrived` | None | Triggered when scrolling reaches the bottom threshold |\n| `scroll` | None | Triggered on scroll |\n\n### Exposed Methods and Refs\n\n| Name | Type | Description |\n|------|------|-------------|\n| `visibleItems` | `Ref\u003cRenderedItem\u003cT\u003e[]\u003e` | Array of currently visible items |\n| `renderItems` | `Ref\u003cRenderedItem\u003cT\u003e[]\u003e` | Array of all rendered items, including buffer |\n| `scrollToItem` | ``({ key: T[keyof T]; alignment: `start` \\| `center` \\| `end`; smooth?: boolean }) =\u003e Promise\u003cvoid\u003e`` | Scrolls to a specific item |\n| `scrollToTop` | `(smooth?: boolean) =\u003e void` | Scrolls to the top of the list |\n| `scrollToBottom` | `(smooth?: boolean) =\u003e Promise\u003cvoid\u003e` | Scrolls to the bottom of the list |\n| `getScroll` | `() =\u003e { scrollHeight: number; scrollTop: number; clientHeight: number }` | Returns current scroll information |\n\n## Virtual List Item Component\n\n### Props\n\n| Prop Name | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `item` | `T` | Yes | The data object for the list item |\n| `index` | `Number` | Yes | The index of the item in the list |\n| `resize` | `Function` | Yes | Callback function to report item height changes |\n\n## Usage\n\nTo use the Virtual List components together:\n\n```vue\n\u003cscript setup lang=\"ts\"\u003e\nimport { VirtualList, VirtualListItem } from '@a993576769/virtual-list';\nimport { ref } from 'vue';\n\nconst myItems = ref([/* your items array */]);\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cVirtualList :items=\"myItems\"\u003e\n    \u003ctemplate #default=\"{ item, index, resize }\"\u003e\n      \u003cVirtualListItem :item=\"item\" :index=\"index\" :resize=\"resize\"\u003e\n        \u003c!-- Your item content here --\u003e\n      \u003c/VirtualListItem\u003e\n    \u003c/template\u003e\n  \u003c/VirtualList\u003e\n\u003c/template\u003e\n```\n\n## License\n\nThis project is licensed under the [MIT license](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F993576769%2Fvirtual-list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F993576769%2Fvirtual-list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F993576769%2Fvirtual-list/lists"}