Install
$ agentstack add skill-skilld-dev-vue-ecosystem-skills-tanstack-vue-virtual-skilld ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
TanStack/virtual @tanstack/vue-virtual@3.13.24
Tags: beta: 3.0.0-beta.68, latest: 3.13.24
References: [Docs](./references/docs/_INDEX.md)
API Changes
This section documents version-specific API changes — prioritize recent major/minor releases.
- BREAKING:
useVirtualizer— replacesuseVirtualin v3 migration; older positional arguments or v2 option names are no longer supported [source](./references/docs/framework/vue/vue-virtual.md)
- BREAKING:
Refreturn type — v3useVirtualizerreturns a VueRefinstead of a raw object; instance methods must be accessed via.value(e.g.,rowVirtualizer.value.getVirtualItems())
- BREAKING:
count— replacessizeoption in v3 migration; usingsizewill result in zero items being virtualized [source](./references/docs/api/virtualizer.md)
- BREAKING:
getScrollElement— replacesparentRefoption in v3 migration; must be a function that returns the scrollable element ornull[source](./references/docs/api/virtualizer.md)
- BREAKING:
measureElement— replacesmeasureRefpattern from v2; you must now passvirtualizer.value.measureElementto therefattribute and setdata-indexon the element [source](./references/docs/api/virtualizer.md)
- NEW:
getTotalSize()auto-updates — as of v3.13.13, the virtualizer automatically notifies the framework when thecountoption changes, ensuringgetTotalSize()and the UI update correctly without manual workarounds for filtering or search [source](./references/releases/@tanstack/vue-virtual@3.13.13.md)
- NEW:
lanes— new in v3; allows dividing the list into multiple columns (vertical) or rows (horizontal) to support grid-like or masonry layouts [source](./references/docs/api/virtualizer.md)
- NEW:
gap— new in v3; specifies the spacing between items in pixels, removing the need for manual margin or padding calculations [source](./references/docs/api/virtualizer.md)
- NEW:
useWindowVirtualizer— specialized adapter for window-based scrolling; simplifies configuration when the browser window is the scroll container [source](./references/docs/framework/vue/vue-virtual.md)
- NEW:
scrollMargin— allows specifying the offset between the scroll container's start and the beginning of the virtualized list; essential for lists preceded by headers [source](./references/docs/api/virtualizer.md)
- NEW:
isRtl— built-in support for right-to-left language locales; inverts horizontal scrolling logic when enabled [source](./references/docs/api/virtualizer.md)
- NEW:
useScrollendEvent— utilizes the nativescrollendevent where available to resetisScrollingstate, falling back to a debounced timer if disabled [source](./references/docs/api/virtualizer.md)
- NEW:
shouldAdjustScrollPositionOnItemSizeChange— provides fine-grained control over scroll position adjustments when dynamic items differ from their estimated size [source](./references/docs/api/virtualizer.md)
- NEW:
useAnimationFrameWithResizeObserver— added in v3.13.x; defers ResizeObserver measurement processing to the next animation frame to batch DOM mutations [source](./references/docs/api/virtualizer.md)
Also changed: isScrollingResetDelay new in v3 · rangeExtractor now receives Range object · VirtualItem adds lane property · resizeItem method for manual size overrides · enabled option to pause observers
Best Practices
- Account for
scrollMarginin absolute positioning — when using a shared scroll container with static headers, subtract the margin from the item's start position to maintain correct layout [source](./references/docs/api/virtualizer.md)
const rowVirtualizer = useVirtualizer({
count: 1000,
scrollMargin: 100, // Height of header
// ...
})
{{ item.index }}
- Overestimate
estimateSizefor dynamic elements — providing a "maximum likely" size prevents the scrollbar from jumping and items from "resetting" their position when scrolling upwards into unmeasured territory [source](./references/docs/api/virtualizer.md)
- Implement
shouldAdjustScrollPositionOnItemSizeChangefor chat/messaging UIs — use this callback to control scroll adjustments when prepending items, preventing visual jumps as new elements are measured [source](./references/docs/api/virtualizer.md)
- Attach
data-indexwhen usingmeasureElement— the virtualizer requires this attribute on the measured DOM element to correctly map the size back to the item's internal state [source](./references/docs/api/virtualizer.md)
{{ item.index }}
- Pass configuration via
computedorRef— the Vue adapter'suseVirtualizerwatch-triggerssetOptionsautomatically, allowing the instance to reactively updatecountoroverscanwithout manual re-instantiation
- Avoid
useAnimationFrameWithResizeObserverfor performance — nativeResizeObserveris already batched; enabling this adds a ~16ms delay that can cause visual flickering or stale measurements during fast scrolls [source](./references/docs/api/virtualizer.md)
- Provide a stable
getItemKeyfor persistent state — using a unique identifier (like a database ID) instead of the default index ensures that item state (focus, internal refs) is preserved during reorders or filtering [source](./references/docs/api/virtualizer.md)
- Wrap initial
scrollToIndexinrequestAnimationFrame— for "scroll-to-bottom" initialization (e.g. chat), deferring the scroll ensures the DOM is rendered and initial measurements are processed by the virtualizer [source](./references/discussions/discussion-911.md)
- Use built-in
gapover manual CSS margins — thegapoption ensures the virtualizer accounts for item spacing in its internalgetTotalSize()calculation, which manual margins do not [source](./references/docs/api/virtualizer.md)
- Pause observers with
enabled: false— instead of unmounting the virtualizer, toggle theenabledoption to pause monitoring (e.g., when a tab is hidden). This preserves existing measurements while saving CPU cycles [source](./references/docs/api/virtualizer.md)
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: skilld-dev
- Source: skilld-dev/vue-ecosystem-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.