spacer element
An empty element sized to the full height of all list items so the scrollbar behaves as if every item were rendered.
In more detail
Its height is the item count multiplied by the item height; only the visible rows are actually placed inside it. Without it the scrollbar would be tiny and jump as rows are swapped in and out.
Related terms
- 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.
- CSS transform — The CSS property that moves, rotates, scales or skews an element without changing the layout around it.
Taught in
- Virtualization: Rendering Infinite Datasets Efficiently — React 19 & Modern Component Architecture