tanstack-virtual

Installation
SKILL.md

TanStack Virtual

Overview

TanStack Virtual is a headless UI utility for virtualizing large lists, grids, and tables. It renders only the visible items in the viewport, dramatically reducing DOM nodes and improving performance for datasets with thousands of rows. Framework adapters are available for React, Vue, Solid, Svelte, Lit, and Angular.

When to use: Rendering thousands of rows or columns, building virtualized tables, implementing infinite scroll, displaying large datasets where DOM node count impacts performance.

When NOT to use: Small lists under ~100 items (no performance benefit), server-rendered static content, layouts where all items must be in the DOM for SEO or accessibility, simple pagination (render one page at a time instead).

Quick Reference

Pattern API Key Points
Vertical list useVirtualizer({ count, getScrollElement, estimateSize }) Wrap items in absolute-positioned container
Horizontal list useVirtualizer({ horizontal: true, ... }) Use getTotalSize() for width instead of height
Grid layout Row virtualizer + column virtualizer Two virtualizer instances sharing one scroll element
Dynamic sizing ref={virtualizer.measureElement} Set data-index on each element
Window scroller useWindowVirtualizer({ count, estimateSize }) No getScrollElement needed
Related skills
Installs
57
GitHub Stars
11
First Seen
Feb 20, 2026