FIG-001 · MASTHEAD

svelte/virtual list.

A dependency-free virtual list component for Svelte 5. Render large datasets with measured dynamic heights, infinite loading, typed snippets, imperative scrolling, and SSR-friendly behavior.

get started ↗ api reference examples compare blog
FIG-001
SHEET 01 / 07
items
10k+
smooth list demo
tarball
54.8kB
packed on npm
runtime deps
0
zero dependencies
heights
auto
ResizeObserver measured
loading
built-in
threshold callback
licence
MIT
open source
FIG-002 / LIVE LIST

render 10,000 rows in real-time.

Keep the DOM small while the scroll range still represents the full dataset. The right pane is the live component; the left pane is the source shape.

file · basic-list.svelte rows 10,000 deps 0 ● LIVE
SRC / VIRTUAL LIST
<script lang="ts">
    import VirtualList from '@humanspeak/svelte-virtual-list'

    const items = Array.from({ length: 10000 }, (_, i) => ({
        id: i,
        title: `Virtual row ${i.toLocaleString()}`
    }))
</script>

<VirtualList {items}>
    {#snippet renderItem(item)}
        <div>{item.title}</div>
    {/snippet}
</VirtualList>
OUT / RENDERED
Virtual row 0 dynamic content ready
Virtual row 1 measured row
Virtual row 2 recycled DOM
Virtual row 3 stable offset
Virtual row 4 typed snippet
Virtual row 5 dynamic content ready
Virtual row 6 measured row
Virtual row 7 recycled DOM
Virtual row 8 stable offset
Virtual row 9 typed snippet
Virtual row 10 dynamic content ready
Virtual row 11 measured row
Virtual row 12 recycled DOM
Virtual row 13 stable offset
Virtual row 14 typed snippet
Virtual row 15 dynamic content ready
Virtual row 16 measured row
Virtual row 17 recycled DOM
Virtual row 18 stable offset
Virtual row 19 typed snippet
Virtual row 20 dynamic content ready
FIG-003 / CAPABILITIES

why svelte-virtual-list.

The Svelte-first list component for large, changing, production datasets.

№ 01 / 06

Dynamic Height Measurement

Rows are measured after render with ResizeObserver so expanded content, async media, and mixed layouts keep their scroll offsets.

№ 02 / 06

Svelte 5 Snippets

Render each item with typed snippets instead of slot-era wrappers or headless measurement glue.

№ 03 / 06

Imperative Scroll Methods

Jump to any index with auto, top, bottom, or nearest alignment for search, keyboard navigation, and focus workflows.

№ 04 / 06

Infinite Loading

Trigger load-more behavior near the rendered range without keeping unreached pages in the DOM.

№ 05 / 06

SSR Friendly

Import safely in SvelteKit routes and hydrate into a measured virtual viewport on the client.

№ 06 / 06

Zero Runtime Dependencies

A focused Svelte component package without a virtualizer core dependency or framework adapter layer.

FIG-004 / SCROLL LAB

jump to any index.

Drive the list by ref, choose alignment, and let dynamic row heights stay measured while the viewport moves.

file · scroll-methods.svelte ● READY
SRC / SCROLL METHOD
<script lang="ts">
    import VirtualList from '@humanspeak/svelte-virtual-list'

    let listRef
    let targetIndex = 5000
    let align = 'auto'

    function scrollToTarget() {
        listRef.scroll({
            index: targetIndex,
            smoothScroll: true,
            align
        })
    }
</script>

<VirtualList items={items} bind:this={listRef}>
    {#snippet renderItem(item)}
        <div>{item.title}</div>
    {/snippet}
</VirtualList>
OUT / RENDERED
Item 0 Expanded copy makes this row taller so the list has to measure real content instead of trusting a fixed size.
Item 1 Compact row.
Item 2 Compact row.
Item 3 Compact row.
Item 4 Compact row.
Item 5 Medium row with enough content to vary height.
Item 6 Compact row.
Item 7 Expanded copy makes this row taller so the list has to measure real content instead of trusting a fixed size.
Item 8 Compact row.
Item 9 Compact row.
Item 10 Medium row with enough content to vary height.
Item 11 Compact row.
Item 12 Compact row.
Item 13 Compact row.
Item 14 Expanded copy makes this row taller so the list has to measure real content instead of trusting a fixed size.
Item 15 Medium row with enough content to vary height.
Item 16 Compact row.
Item 17 Compact row.
Item 18 Compact row.
Item 19 Compact row.
Item 20 Medium row with enough content to vary height.
FIG-005 / COMPARISON MATRIX

how we compare.

Honest, side-by-side comparisons against Svelte-first, headless, multi-framework, and legacy virtual-list packages.

librarycategorydynamic heightsinfinite loadingscroll to indexruntime depsread more
@humanspeak/svelte-virtual-list ●Svelte 5 componentyesyesyes0this row
TanStack VirtualHeadless VirtualizeryesUser-land patternyes@tanstack/virtual-coreread more
virtuaMulti-framework VirtualizeryesUser-land patternyes0read more
svelte-tiny-virtual-listSvelte Virtual List ComponentExplicit sizes / recomputeFooter slot patternyes0read more
@sveltejs/svelte-virtual-listLegacy Svelte Virtual ListLimited legacy behaviornono0read more
view all comparisons →
FIG-006 / AI-READY

built for ai-assisted code.

Point Cursor, Claude Code, or any LLM at the generated manifests and mirrors so they can find the component API, scroll methods, examples, and comparisons.

llms.txt llms-full.txt /llmstxt.org
// example prompt Use https://virtuallist.svelte.page/llms.txt as the source for @humanspeak/svelte-virtual-list. Build a Svelte 5 feed with dynamic row heights, infinite loading, and a search result jump that calls scroll with an index and alignment.
FIG-007 / EXAMPLES

explore interactive examples.

See basic rendering, infinite loading, imperative scrolling, variable heights, and the docs pages that explain the same APIs in detail.

view all examples →
SET / JETBRAINS MONO + INTER
HUMANSPEAK · 2026
MIT LICENCE
● 0.5.2
SHEET 07 / 07
END OF DOCUMENT
↩ TO TOP