<nve-virtual-list>
Properties
Read-only exclusive requested end index; initially 0. The requested item count is end - start.
number
Extra items on each side of the viewport. Must be a nonnegative safe integer; invalid values produce a diagnostic and use the default of 2.
number
Required total number of items: a nonnegative safe integer. Total height (itemCount * itemHeight) cannot exceed 16,000,000 CSS pixels. Supports property assignments before the first update. For deliberate imperative configuration without attributes, narrowly suppress @nvidia-elements/lint/no-invalid-virtual-list and explain the assignments; don't use invalid placeholder attributes.
number
Required finite item height greater than zero, in CSS pixels. The viewport sizes slotted items to exactly this height, including borders, and clips overflow. Keep custom item internals within this height and avoid gaps between items.
number
Current immutable virtual-change request. Attach the listener before initialization, or read this property after attaching it and render once. Recheck identity before an asynchronous DOM update to discard obsolete work. Undefined for invalid geometry.
Read-only inclusive requested start index; initially 0.
number
Events
Requests [start, end) through immutable detail: { start, end, count }. count is the total dataset size. Range properties update before dispatch. Fires initially for valid geometry, including an empty dataset, then only when (start, end, count) changes. Slot changes don't request another range. Bubbles across shadow boundaries.
Reports detail: { scrollTop, direction } when vertical position changes. Direction is up or down relative to the previous notification. Coalesces updates per animation frame, including programmatic scrolling; unchanged positions emit no event. Bubbles across shadow boundaries. Native scroll and scrollend remain available on the host.
Slots
Elements for the requested [start, end) range. Replace or reorder assigned elements for a new window; reusing the same elements with only content or property updates cannot signal a new window. Content stays hidden while a different window awaits changed assignments. Asynchronous consumers must discard obsolete work before changing DOM. In grids, render direct nve-grid-row children and supply logical aria-rowindex values and total aria-rowcount. The wrapper adds no list or region role, and the spacer stays outside the accessibility tree.
Invoker Commands
Scroll to the integer index in the source button's value, using scrollToIndex(). Missing, empty, fractional, or invalid numeric values have no effect.
Methods
refresh(): void
Recalculate geometry and range from the current viewport and scroll position. Scrolling, resizing, and valid configuration changes refresh automatically. Emits no event when (start, end, count) stays unchanged.
scrollToIndex(index: number, behavior?: ScrollBehavior): void
Scroll the nearest edge of an integer index into view. Clamp finite integer indices to dataset bounds; ignore fractional indices, NaN, infinity, and empty datasets. Items taller than the viewport align to their start. The default is immediate and interrupts smooth scrolling, even when CSS sets scroll-behavior: smooth. Pass an explicit ScrollBehavior to override it.
CSS Properties
Output containing valid itemHeight in pixels. Slotted items use this fixed height automatically; custom item templates can also use it for their internal layout.
Viewport height; default auto. Supply a bounded height for virtualization. A zero-height viewport requests [0, 0) and recovers when measurable.
Container width. Defaults to 100%. MDN