{"id":13571603,"url":"https://github.com/daybrush/infinite-viewer","last_synced_at":"2025-04-12T19:43:39.019Z","repository":{"id":41817604,"uuid":"214314131","full_name":"daybrush/infinite-viewer","owner":"daybrush","description":"Infinite Viewer is Document Viewer Component with infinite scrolling.","archived":false,"fork":false,"pushed_at":"2023-10-31T17:55:52.000Z","size":8773,"stargazers_count":313,"open_issues_count":51,"forks_count":32,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-03T23:42:26.928Z","etag":null,"topics":["infinite","scrolling","viewer"],"latest_commit_sha":null,"homepage":"https://daybrush.com/infinite-viewer/","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/daybrush.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"daybrush","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-10-11T01:04:40.000Z","updated_at":"2025-03-26T08:51:48.000Z","dependencies_parsed_at":"2023-02-15T12:15:39.852Z","dependency_job_id":"814df3ff-8751-4520-b17e-c10cd675b15e","html_url":"https://github.com/daybrush/infinite-viewer","commit_stats":null,"previous_names":[],"tags_count":205,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daybrush%2Finfinite-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daybrush%2Finfinite-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daybrush%2Finfinite-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daybrush%2Finfinite-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daybrush","download_url":"https://codeload.github.com/daybrush/infinite-viewer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625479,"owners_count":21135512,"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","scrolling","viewer"],"created_at":"2024-08-01T14:01:03.733Z","updated_at":"2025-04-12T19:43:38.986Z","avatar_url":"https://github.com/daybrush.png","language":"TypeScript","funding_links":["https://github.com/sponsors/daybrush"],"categories":["TypeScript","Table of contents"],"sub_categories":["Third Party Components"],"readme":"\n\u003cp align=\"middle\" \u003e\u003cimg src=\"https://daybrush.com/infinite-viewer/images/logo.png\" /\u003e\u003c/p\u003e\n\u003ch2 align=\"middle\"\u003eInfinite Viewer\u003c/h2\u003e\n\u003cp align=\"middle\"\u003e\n\u003ca href=\"https://www.npmjs.com/package/infinite-viewer\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/infinite-viewer.svg?style=flat-square\u0026color=007acc\u0026label=version\" alt=\"npm version\" /\u003e\u003c/a\u003e\n\u003cimg src=\"https://img.shields.io/badge/language-typescript-blue.svg?style=flat-square\"/\u003e\n\u003ca href=\"https://github.com/daybrush/infinite-viewer/blob/master/LICENSE\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/github/license/daybrush/infinite-viewer.svg?style=flat-square\u0026label=license\u0026color=08CE5D\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/daybrush/infinite-viewer/tree/master/packages/react-infinite-viewer\" target=\"_blank\"\u003e\u003cimg alt=\"React\" src=\"https://img.shields.io/static/v1.svg?label=\u0026message=React\u0026style=flat-square\u0026color=61daeb\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/daybrush/infinite-viewer/tree/master/packages/preact-infinite-viewer\" target=\"_blank\"\u003e\u003cimg alt=\"Preact\" src=\"https://img.shields.io/static/v1.svg?label=\u0026message=Preact\u0026style=flat-square\u0026color=673ab8\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/daybrush/infinite-viewer/tree/master/packages/ngx-infinite-viewer\" target=\"_blank\"\u003e\u003cimg alt=\"Angular\" src=\"https://img.shields.io/static/v1.svg?label=\u0026message=Angular\u0026style=flat-square\u0026color=C82B38\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/daybrush/infinite-viewer/tree/master/packages/vue-infinite-viewer\" target=\"_blank\"\u003e\u003cimg\n    alt=\"Vue\"\n    src=\"https://img.shields.io/static/v1.svg?label=\u0026message=Vue\u0026style=flat-square\u0026color=3fb984\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/daybrush/infinite-viewer/tree/master/packages/vue3-infinite-viewer\" target=\"_blank\"\u003e\u003cimg\n    alt=\"Vue 3\"\n    src=\"https://img.shields.io/static/v1.svg?label=\u0026message=Vue 3\u0026style=flat-square\u0026color=3fb984\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/daybrush/infinite-viewer/tree/master/packages/svelte-infinite-viewer\" target=\"_blank\"\u003e\u003cimg\n    alt=\"Svelte\"\n    src=\"https://img.shields.io/static/v1.svg?label=\u0026message=Svelte\u0026style=flat-square\u0026color=C82B38\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/daybrush/infinite-viewer/tree/master/packages/lit-infinite-viewer\" target=\"_blank\"\u003e\u003cimg\n    alt=\"Lit\"\n    src=\"https://img.shields.io/static/v1.svg?label=\u0026message=Lit\u0026style=flat-square\u0026color=4E8EE0\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"middle\"\u003eInfinite Viewer is Document Viewer Component with infinite scrolling up, down, left and right.\n\u003c/p\u003e\n\n\u003cp align=\"middle\"\u003e\n    \u003ca href=\"https://daybrush.com/infinite-viewer\" target=\"_blank\"\u003e\u003cstrong\u003eDemo\u003c/strong\u003e\u003c/a\u003e /\n    \u003ca href=\"https://daybrush.com/infinite-viewer/release/latest/doc/\" target=\"_blank\"\u003e\u003cstrong\u003eAPI\u003c/strong\u003e\u003c/a\u003e /\n    \u003ca href=\"https://github.com/daybrush/scena\" target=\"_blank\"\u003e\u003cstrong\u003eMain Project\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n## ❗Changed❗\n* Change name `useForceWheel` to `useWheelScroll` option\n\n## ⚙️ Installation\n### npm\n```bash\n$ npm install infinite-viewer\n```\n\n### scripts\n\n```html\n\u003cscript src=\"//daybrush.com/infinite-viewer/release/latest/dist/infinite-viewer.min.js\"\u003e\u003c/script\u003e\n```\n\n## 🚀 How to use\n* In chrome, the scroll event is used instead of the wheel event due to the backward and forward swipe gesture. If you set `overscroll-behavior: none;` on the body, you can use `useWheelScroll` option.\n\n```html\n\u003cdiv class=\"viewer\"\u003e\n    \u003cdiv class=\"viewport\"\u003e\n        AAAA\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n```js\nimport InfiniteViewer from \"infinite-viewer\";\n\nconst infiniteViewer = new InfiniteViewer(\n    document.querySelector(\".viewer\"),\n    document.querySelector(\".viewport\"),\n    {\n        margin: 0,\n        threshold: 0, \n        zoom: 1,\n        rangeX: [0, 0],\n        rangeY: [0, 0],\n    },\n);\n\ninfiniteViewer.on(\"scroll\", () =\u003e {\n    console.log(infiniteViewer.getScrollLeft(), infiniteViewer.getScrollTop());\n});\n```\n## Structure\n* Before\n```html\n\u003cdiv class=\"viewer\"\u003e\n    \u003cdiv class=\"viewport\"\u003e\n        AAAA\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n* After\n```html\n\u003cdiv class=\"container\"\u003e\n    \u003cdiv class=\"infinite-viewer-wrapper\"\u003e\n        \u003cdiv class=\"infinite-viewer-scroll-area\"\u003e\u003c/div\u003e\n        \u003cdiv class=\"viewport\"\u003eAAA\u003c/div\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"infinite-viewer-scroll-bar infinite-viewer-vertical-scroll-bar\"\u003e\n        \u003cdiv class=\"infinite-viewer-scroll-thumb\"\u003e\u003c/div\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"infinite-viewer-scroll-bar infinite-viewer-horizontal-scroll-bar\"\u003e\n        \u003cdiv class=\"infinite-viewer-scroll-thumb\"\u003e\u003c/div\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\n## 📦 Packages\n|Package\u0026nbsp;Name|\u0026nbsp;Version\u0026nbsp;|Description|\n|---|---|---|\n|[**react-infinite-viewer**](https://github.com/daybrush/infinite-viewer/tree/master/packages/react-infinite-viewer)|[![](https://img.shields.io/npm/v/react-infinite-viewer.svg?style=flat-square)](https://npmjs.com/package/react-infinite-viewer)|A React Infinite Viewer Component that allows you to select elements in the drag area using the mouse or touch.|\n|[**ngx-infinite-viewer**](https://github.com/daybrush/infinite-viewer/tree/master/packages/ngx-infinite-viewer)|[![](https://img.shields.io/npm/v/ngx-infinite-viewer.svg?style=flat-square)](https://npmjs.com/package/ngx-infinite-viewer)|An Angular Infinite Viewer Component that allows you to select elements in the drag area using the mouse or touch.|\n|[**vue-infinite-viewer**](https://github.com/daybrush/infinite-viewer/tree/master/packages/vue-infinite-viewer)|[![](https://img.shields.io/npm/v/vue-infinite-viewer.svg?style=flat-square)](https://npmjs.com/package/vue-infinite-viewer)|A Vue Infinite Viewer Component that allows you to select elements in the drag area using the mouse or touch.|\n|[**vue3-infinite-viewer**](https://github.com/daybrush/infinite-viewer/tree/master/packages/vue3-infinite-viewer)|[![](https://img.shields.io/npm/v/vue3-infinite-viewer.svg?style=flat-square)](https://npmjs.com/package/vue3-infinite-viewer)|A Vue 3 Infinite Viewer Component that allows you to select elements in the drag area using the mouse or touch.|\n|[**preact-infinite-viewer**](https://github.com/daybrush/infinite-viewer/tree/master/packages/preact-infinite-viewer)|[![](https://img.shields.io/npm/v/preact-infinite-viewer.svg?style=flat-square)](https://npmjs.com/package/preact-infinite-viewer)|A Preact Infinite Viewer Component that allows you to select elements in the drag area using the mouse or touch.|\n|[**svelte-infinite-viewer**](https://github.com/daybrush/infinite-viewer/tree/master/packages/svelte-infinite-viewer)|[![](https://img.shields.io/npm/v/svelte-infinite-viewer.svg?style=flat-square)](https://npmjs.com/package/svelte-infinite-viewer)|A Svelte Infinite Viewer Component that allows you to select elements in the drag area using the mouse or touch.|\n|[**lit-infinite-viewer**](https://github.com/daybrush/infinite-viewer/tree/master/packages/lit-infinite-viewer)|[![](https://img.shields.io/npm/v/lit-infinite-viewer.svg?style=flat-square)](https://npmjs.com/package/lit-infinite-viewer)|A Lit Infinite Viewer Component that allows you to select elements in the drag area using the mouse or touch.|\n\n\n## ⭐️ Show Your Support\nPlease give a ⭐️ if this project helped you!\n\n## 👏 Contributing\n\nIf you have any questions or requests or want to contribute to `infinite-viewer` or other packages, please write the [issue](https://github.com/daybrush/infinite-viewer/issues) or give me a Pull Request freely.\n\n## 🐞 Bug Report\n\nIf you find a bug, please report to us opening a new [Issue](https://github.com/daybrush/infinite-viewer/issues) on GitHub.\n\n\n## 📝 License\n\nThis project is [MIT](https://github.com/daybrush/infinite-viewer/blob/master/LICENSE) licensed.\n\n```\nMIT License\n\nCopyright (c) 2020 Daybrush\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaybrush%2Finfinite-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaybrush%2Finfinite-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaybrush%2Finfinite-viewer/lists"}