
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
svelte-infinite-scroll
Advanced tools
Infinite Scroll Component to Svelte.
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:
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:
<script>
import InfiniteScroll from "svelte-infinite-scroll";
import allCountries from "./countries.js";
let page = 0;
let size = 20;
let countries = [];
$: countries = [
...countries,
...allCountries.splice(size * page, size * (page + 1) - 1)
];
</script>
<style>
ul {
width: 400px;
max-height: 400px;
overflow-x: scroll;
}
</style>
<ul>
{#each countries as country}
<li>{country.name}</li>
{/each}
<InfiniteScroll threshold={100} on:loadMore={() => page++} />
</ul>
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 |
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.
FAQs
Infinite Scroll Component to Svelte
The npm package svelte-infinite-scroll receives a total of 1,100 weekly downloads. As such, svelte-infinite-scroll popularity was classified as popular.
We found that svelte-infinite-scroll demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.