{"repo":"ndom91/svelte-infinite","free":true,"listed":false,"github":"https://github.com/ndom91/svelte-infinite","clone":"git clone https://github.com/ndom91/svelte-infinite.git","description":"Svelte 5 Infinite Loader","language":"TypeScript","stars":108,"topics":["infinite-loader","infinite-scroll","svelte","svelte5"],"license":"MIT","category":"ui-components","readme_excerpt":"Svelte Infinite ✨ Flexible ⏰ Infinite Loop Detection 📣 Control Loader State 🔎 IntersectionObserver based 🔥 Using Runes and Snippets 🧑‍🔧 Demo : svelte-5-infinite.vercel.app [!WARNING] v0.5.0 contains a breaking change. See this PR for more details including migration steps. 🏗️ Getting Started 1. Install svelte-infinite 2. Import both InfiniteLoader and LoaderState from svelte-infinite 🍍 Example This is a more realistic example use-case which includes a paginated data endpoint that your triggerLoad function should hit every time it's called to load more data. It also includes the use of some of the optional snippets to render custom markup inside the loader component. ♾️ Usage This package consists of two parts, first the InfiniteLoader component which is a wrapper around your items. It will trigger whichever async function you've passed to the triggerLoad prop when the user scrolls to the bottom of the list. Second, there is also a LoaderState class which you should use to interact with the internal state of the loader. For example, if your fetch call errored, or you've reached the maximum number of items, etc. you can communicate that to the loader. The most basic usage example can be seen in the 'Getting Started' section above. A more complex example can be seen in the 'Example' section, and of course the application in /src/routes/+page.svelte in this repository also has a \"real world\" usage example. [!WARNING] As of 0.5.0 the LoaderState import is not an instance of","default_branch":null,"files":null,"tree":[],"storefront":"/r/ndom91","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ndom91/svelte-infinite/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}