VirtualScroller
Renders only the visible part of a long list, row or grid — vertical, horizontal or both — with lazy ranges, loaders and scrolling to any item.
Basic
10 000 items, only the visible ones are in the page. Tab focuses the list, the arrow keys and Page Up / Page Down scroll it.
Horizontal
orientation="horizontal" scrolls sideways; itemSize is the width of an item.
Grid
orientation="both" virtualizes rows and columns — items is an array of rows and itemSize is [rowHeight, columnWidth].
Lazy
lazy emits lazyLoad with the range to show; missing items render the loader template until they arrive. step asks in chunks.
Loader
showLoader with a delay shows loaders while the list scrolls and renders the items once it stops. Without a loader template a mask with a spinner covers the list.
Scroll to
scrollToIndex() and scrollInView() jump to any item; scrollIndexChange reports the visible range.
Visible: 0 – 10
Content
txVirtualScrollerContent renders the whole range yourself — here as rows of a list with semantic markup.
- Contact 1contact1@example.com
- Contact 2contact2@example.com
- Contact 3contact3@example.com
- Contact 4contact4@example.com
- Contact 5contact5@example.com
- Contact 6contact6@example.com
- Contact 7contact7@example.com
- Contact 8contact8@example.com
- Contact 9contact9@example.com
- Contact 10contact10@example.com
- Contact 11contact11@example.com
- Contact 12contact12@example.com
- Contact 13contact13@example.com
- Contact 14contact14@example.com
- Contact 15contact15@example.com
Design tokens
dt changes the tokens of one scroller — a softer loading mask and a larger spinner.
Pass through
pt adds classes and styles to the parts; unstyled keeps only the behaviour.