Virtual Scrolling Playground

10,000 coupons in the neighbourhood head’s book: how many rows are really in the DOM? Scroll a real list, then test windowing on keyboard focus, screen…

Why it matters

A long list (a chat, a table, a feed) rendered in full makes thousands of DOM nodes: slow to mount, heavy to lay out, wasteful of memory. Windowing parts the data’s length from the DOM’s size, at a cost: keyboard focus, screen readers, Ctrl+F and rows of different heights must be looked after by hand.

The key idea

The data’s length and the DOM’s size need not match

Common mistakes

Try it in this playground