NEURALNG

VIRTUALSCROLLER

API

Component

NeuralVirtualScroller<T>

Standalone component with selector neural-virtual-scroller. VirtualScrollerComponent remains only as a deprecated compatibility alias.

Inputs and model

NameTypeDefaultPurpose
itemsreadonly T[][] Immutable source collection.
itemSizenumber48 Fixed item size on the scroll axis.
viewportSizenumber320 Viewport size on the scroll axis.
overscannumber3 Extra rendered items around the viewport.
orientation'vertical' | 'horizontal''vertical' Scroll axis.
firstmodel<number>0 First visible item index.
lazybooleanfalse Emits lazyLoad for each new range.
loadingbooleanfalse Displays the loading layer.
emptyMessagestring'No items found' Empty-state label.
loadingMessagestring'Loading items' Loading-state label.
ariaLabelstring'Virtual list' Region and list name.
tabindexnumber0 Native viewport tab order.
trackByNeuralVirtualScrollerTrackBy<T> | nullnull Stable item identity.
unstyledbooleanfalse Removes NeuralNg visual classes.
virtualScrollerClassstring'' Additive root class.
classesNeuralVirtualScrollerClasses{} Typed class slots.

Events

rangeChangeNeuralVirtualScrollerRangeEvent

Rendered or visible window changed.

lazyLoadNeuralVirtualScrollerRangeEvent

New lazy range requested.

scrolledNeuralVirtualScrollerScrollEvent

Native scroll with offset and range.

firstChangenumber

Generated model output.

Methods

scrollToIndex(index, behavior?)

Scrolls to a clamped item index.

scrollToOffset(offset, behavior?)

Scrolls to a non-negative pixel offset.

Typed templates and class slots

neuralVirtualScrollerItem, neuralVirtualScrollerEmpty and neuralVirtualScrollerLoading preserve template inference.

rootviewportcontentspacerBeforeitemsitemspacerAfteremptyloading

Public types

NeuralVirtualScrollerOrientationNeuralVirtualScrollerScrollBehaviorNeuralVirtualScrollerRangeEventNeuralVirtualScrollerScrollEventNeuralVirtualScrollerTrackBy<T>NeuralVirtualScrollerItemContext<T>NeuralVirtualScrollerStateContextNeuralVirtualScrollerClasses