TanStack · Method
virtualizer.scrollToIndex
scrollToIndex scrolls a TanStack Virtualizer to a selected item. You can control the item's alignment and use normal or smooth scrolling.
Last updated
Syntax
scrollToIndex(index: number, options?: { align?: 'start' | 'center' | 'end' | 'auto'; behavior?: 'auto' | 'smooth' }): voidIn-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
VirtualizerscrollToOffsetscrollByscrollToEndgetVirtualItemsgetVirtualIndexes