Skip to content

Virtual List

VirtualList uses TanStack Virtual for high-performance virtual scrolling. Suited for large lists; you control how each item is rendered.

Basic usage

Props

NameTypeDefaultDescription
countnumber0Total number of items
estimate-sizenumber | (index: number) => number50Estimated item size (px); can be a function
horizontalbooleanfalseHorizontal scrolling
optionsobject{}Extra options passed to the virtualizer

Slots

NameSlot propsDescription
item{ index, style }Renders each item

Events

NamePayloadDescription
scrollEnd-Fired when scrolled to the end
scrollStart-Fired when scrolled to the start
scrollvisible index arrayFired while scrolling