Virtual list

Windowed list rendering backed by TanStack Virtual, with measured dynamic row heights.

Virtual list

Dynamic height

s-virtual-list only mounts rows near the viewport. It measures each rendered row, so wrapped text, expand/collapse state, and appended content retain correct offsets and scroll anchoring.

Code copied

PROPS

PropertyTypeValuesDescriptiondefaultExampleMore
overscanNumberitem countRender this many extra rows before and after the visible range.5
itemsArrayunknown[]Source data rendered by the virtual list.[]
heightNumber | StringCSS heightScroll viewport height.320
estimate-sizeNumberpixelsInitial estimate before a row is measured. Use a realistic upper estimate for dynamic rows.48
dynamicBooleantrue | falseMeasure every rendered row and support dynamic heights.true
item-keyFunction(itemindex) => string | numberStable unique row key. Required when data can reorder or append.index
No matching data

EVENTS

PropertyTypeValuesDescriptiondefaultExampleMore
range-changeFires when rendered virtual row range changes.
scrollNative scroll event from the viewport.
No matching data

EXPOSES

PropertyTypeValuesDescriptiondefaultExampleMore
scrollToIndex / scrollToOffset / measureScroll programmatically or reset all dynamic row measurements.
No matching data
Last Updated: 2026-08-17, 08:33:54