Data
VirtualList
Windowed list for huge datasets — renders only the visible slice. Fixed item height; for variable-height virtualisation, fork and adapt.
Examples
10,000 rows, 36px each
Row 1 id-00000
Row 2 id-00001
Row 3 id-00002
<VirtualList items={items} itemHeight={36} height="240px">
{#snippet item(it)}
<div>{it.label}</div>
{/snippet}
</VirtualList>Props
| Prop | Type | Default | Description |
|---|---|---|---|
items | T[] | — | Full dataset; only the visible window is rendered. |
itemHeight | number | — | Fixed row height in px. |
height | string | '320px' | Viewport height. |
overscan | number | 3 | Extra rows above/below viewport. |
item | Snippet<[T, index]> | — | Per-row renderer. |
Install
CLI
npx @a3tai/mittsu add virtual-list