Infinite Scroll Component to Svelte
npm install svelte-infinite-scroll •  •  •  •  • 
Infinite Scroll Component to Svelte.
``bash
npm i svelte-infinite-scroll
// or
yarn add svelte-infinite-scroll
`
_Note: to use this library in Sapper applications, install as devDependency. Take a look at this link._
Local demo:
`bash`
git clone https://github.com/andrelmlins/svelte-infinite-scroll.git
cd svelte-infinite-scroll
npm install && npm run dev
An example of how to use the library:
`js
$3
- Infinite scroll with requests | Link | Author
- Infinite scroll reverse | Link | Author
Properties
Component props:
| Prop | Type | Default | Description |
| --------------- | ------ | ------- | ----------------------------------------- |
|
threshold | number | 0 | Threshold to call loadMore |
| elementScroll | node | - | Element to bind scroll |
| window | bool | false | Bind scroll in window |
| hasMore | bool | true | Tells you if there are more items to load |
| horizontal | bool | false | Changing orientation |
| reverse | bool | false | Revese scroll direction |Events
| Event | Description |
| ---------- | ----------------------------------------- |
|
loadMore` | Tells you if there are more items to load |Download stats for this NPM package.

Svelte Infinite Scroll is open source software licensed as MIT.