A high-performance virtual list component for Svelte that efficiently renders large amounts of data.
npm install svelte-vlist
<script>
import VirtualList from 'svelte-vlist';
let items = [/* your data array */];
let start = 0;
let end = 0;
</script>
<VirtualList items={items} bind:start bind:end let:item let:index>
<div class="item">
<h3>{item.title}</h3>
<p>Index: {index}</p>
</div>
</VirtualList>
items (Array, required): The array of data items to renderheight (String, default: "100%"): The height of the virtual list containerstart (Number, bindable): The starting index of visible itemsend (Number, bindable): The ending index of visible itemsitem: The current item dataindex: The index of the current item in the original arrayMIT