VirtualList
function VirtualList<Data>(props): Element;Render a virtual Preact list with model-owned DOM geometry.
Type Parameters
Data
Data = unknown
Parameters
props
ListProps<Data>
Returns
Element
Related examples
- HorizontalpreactThis example virtualizes a horizontal collection: columns are measured and positioned along the x-axis while the browser keeps a native horizontal scrollbar.
- Simple ListpreactThis is the smallest complete virtual list for each framework. Application data stays in the framework while the adapter renders and measures only the current visible range.
- Sticky Header And FooterpreactThis example keeps a header and footer inside the scrolling viewport while the virtual item range remains measured and independently positioned.
- Variable SizepreactThis example renders rows whose heights differ and can change after mount. Mounted items report their real border-box size, replacing the initial estimate without requiring application-side layout reads.
- Live FeedpreactThis example appends variable-height messages while demonstrating end-anchor behavior: a reader at the end stays at the newest message, while a reader who scrolled upward keeps the current viewport.
- Load On DemandpreactThis example loads another data batch when the rendered range approaches the end of the current collection.