list virtualization

Rendering only the rows of a long list that are currently visible, plus a few extra, instead of creating DOM nodes for every item.

In more detail

A tall spacer element gives the scrollbar the full list height, and visible rows are positioned inside it with translateY. As the user scrolls, the start and end indexes are recalculated from scrollTop, row height and viewport height. Libraries such as TanStack Virtual handle variable row heights.

Related terms

Taught in

References