svelte-tiny-virtual-list
- A tiny but mighty list virtualization library for Svelte, with zero dependencies.
- Purpose: Renders only visible items in large lists to improve performance and keep the page lightweight.
- Inspired by react-tiny-virtual-list .
Key Features
- Tiny & dependency-free (~5kb gzipped).
- Supports rendering millions of items efficiently.
- Scroll to index or set initial scroll offset.
- Supports fixed or variable heights/widths.
- Works for vertical or horizontal lists.
- Compatible with `svelte-infinite-loading` .
Target Audience
- Developers building Svelte applications requiring optimized rendering for large datasets.
Core Functionality
- Virtualizes lists by rendering only visible items.
- Provides slots (
item
,header
,footer
) for custom content. - Supports dynamic item sizing and sticky indices.
- Offers events (
afterScroll
,itemsUpdated
) and methods (recomputeSizes
) for control.
Framework Support
- Primarily designed for Svelte.
Examples
- Basic setups (equal/variable heights, horizontal lists).
- Controlled props (scroll to index, offset).
- Integration with
svelte-infinite-loading
for infinite scrolling.
For more details, check the playground examples .
sveltesvelte-componentsvirtuallistscrollinfiniteloadingcomponentplugin
Featured Stories
No featured articles here. Navigate to an article, then pick the Feature on menu button