@tanstack/react-virtual
Headless virtualizer for rendering large lists and grids without windowing libraries, measuring elements dynamically.
Official Documentation ↗v3.10. Check the official docs for the latest API surface.Installation
npm install @tanstack/react-virtualMethods
No methods match this filter.
@tanstack/react-virtual is headless virtualizer for rendering large lists and grids without windowing libraries, measuring elements dynamically. This page documents the core methods, installation, and common usage patterns for the current stable release.
Installation
Install @tanstack/react-virtual with your preferred package manager using the command shown in the frontmatter. The package is published to the npm registry and ships with TypeScript types where applicable.
Core methods
The methods listed in the frontmatter cover the primary API surface. Each signature reflects the v3.10 release. Consult the official documentation linked in sourceUrl for advanced options, edge cases, and breaking changes between major versions.
Frequently asked questions
The faq section in the frontmatter answers the most common questions about @tanstack/react-virtual, including comparisons with alternatives, configuration tips, and runtime requirements. If your question is not covered, check the source URL for the full guide.
API reference evidence
Fetched from official sources on 2026-11-08T19:58:23+08:00 via WebFetch https://cdn.jsdelivr.net/npm/@tanstack/[email protected]/dist/esm/index.d.ts;WebFetch https://cdn.jsdelivr.net/npm/@tanstack/[email protected]/dist/esm/index.d.ts;WebFetch https://tanstack.com/virtual/latest/docs/api/virtualizer.
useVirtualizer→ signature from https://cdn.jsdelivr.net/npm/@tanstack/[email protected]/dist/esm/index.d.ts; official text: “export declare function useVirtualizer<TScrollElement extends Element, TItemElement extends Element>(options: PartialKeys<VirtualizerOptions<TScrollElement, TItemElement>, ‘observeElementRect’ | ‘observeElementOffset’ | “virtualizer.getVirtualItems→ signature from https://cdn.jsdelivr.net/npm/@tanstack/[email protected]/dist/esm/index.d.ts; official text: “measureElement: (node: TItemElement | null | undefined) => void; getVirtualItems: () => VirtualItem[]; getVirtualItemForOffset: (offset: number) => VirtualItem | undefined;”virtualizer.measureElement→ signature from https://cdn.jsdelivr.net/npm/@tanstack/[email protected]/dist/esm/index.d.ts; official text: “measureElement: (node: TItemElement | null | undefined) => void; getVirtualItems: () => VirtualItem[];”
FAQ
- Does it support dynamic row heights?
- Yes. Call measureElement on each rendered row; the virtualizer caches and adjusts offsets.
- Can it virtualize grids?
- Yes. Use two virtualizers (horizontal and vertical) or the grid virtualizer helper.
- Is it framework-agnostic?
- The core @tanstack/virtual-core is; react-virtual is the React adapter.
Report a problem with this API docOpens a pre-filled issue on GitHub.