Description
svelte-tiny-virtual-list is a list virtualization component for Svelte. Instead of rendering every item in a long list, it renders only the items that are visible on screen, which keeps the page light even when the data set is large. The README says it has no dependencies, is about 5 kB gzipped, and can render millions of items. It supports fixed or variable item heights and widths, so you can build vertical or horizontal lists. You can scroll to a given index or set an initial scroll offset, and the scroll position can be controlled from your own code. Each item is rendered through a snippet that receives a style and an index, and the README includes an example that combines the component with svelte-infinite-loading to load more items as the user scrolls. The author notes that the library is heavily inspired by react-tiny-virtual-list and reuses much of its code and behavior. It installs with npm, yarn or pnpm. The project includes examples for equal-height items, variable heights, horizontal lists, scrolling to an index and controlled scroll offsets, along with a Hacker News demo. The source is on GitHub and the license is linked from the repository.…
Highlights
- Renders only the visible items of a long list
- Zero dependencies and about 5 kB gzipped
- Fixed or variable heights and widths
- Vertical or horizontal lists
- Scroll to an index or control the scroll offset
Ratings & Reviews
No ratings yet
Be the first to rate svelte-tiny-virtual-list.
People also visit

react-tiny-virtual-list
A tiny but mighty list virtualization component, with zero dependencies

react-window
React components for efficiently rendering large lists and tabular data

vue-virtual-scroller
Component to scroll a large amount of elements efficiently (Vue 2.x)

react-virtualized
React components for efficiently rendering large lists and tabular data
svelte-tiny-virtual-list FAQ
What does svelte-tiny-virtual-list do?
It renders only the visible items in a list, so long lists stay fast and light in a Svelte app.
Does it have dependencies?
No. The README says it is dependency free and about 5 kB gzipped.
Can it handle items of different sizes?
Yes. It supports fixed or variable heights and widths.
How do I install it?
Run npm install svelte-tiny-virtual-list, or use yarn or pnpm.
Does it work with infinite loading?
The README shows it working with svelte-infinite-loading to load more items as the user scrolls.
What are the best svelte-tiny-virtual-list alternatives?
Popular alternatives to svelte-tiny-virtual-list include react-tiny-virtual-list, virtua and react-window. See all svelte-tiny-virtual-list alternatives













