Interface: VirtualizerHandle

June 29, 2026 ยท View on GitHub

API


Interface: VirtualizerHandle

Defined in: src/react/Virtualizer.tsx:42

Methods of Virtualizer.

Extended by

Methods

findItemIndex()

findItemIndex(offset): number

Defined in: src/react/Virtualizer.tsx:63

Find nearest item index from offset.

Parameters

offset

number

offset in pixels from the start of the scroll container

Returns

number


getItemOffset()

getItemOffset(index): number

Defined in: src/react/Virtualizer.tsx:68

Get item offset from start.

Parameters

index

number

index of item

Returns

number


getItemSize()

getItemSize(index): number

Defined in: src/react/Virtualizer.tsx:73

Get item size.

Parameters

index

number

index of item

Returns

number


scrollToIndex()

scrollToIndex(index, opts?): void

Defined in: src/react/Virtualizer.tsx:79

Scroll to the item specified by index.

Parameters

index

number

index of item

opts?

ScrollToIndexOpts

options

Returns

void


scrollTo()

scrollTo(offset): void

Defined in: src/react/Virtualizer.tsx:84

Scroll to the given offset.

Parameters

offset

number

offset from start

Returns

void


scrollBy()

scrollBy(offset): void

Defined in: src/react/Virtualizer.tsx:89

Scroll by the given offset.

Parameters

offset

number

offset from current position

Returns

void

Properties

cache

readonly cache: CacheSnapshot

Defined in: src/react/Virtualizer.tsx:46

Get current CacheSnapshot.


scrollOffset

readonly scrollOffset: number

Defined in: src/react/Virtualizer.tsx:50

Get current scrollTop, or scrollLeft if horizontal: true.


scrollSize

readonly scrollSize: number

Defined in: src/react/Virtualizer.tsx:54

Get current scrollHeight, or scrollWidth if horizontal: true.


viewportSize

readonly viewportSize: number

Defined in: src/react/Virtualizer.tsx:58

Get current offsetHeight, or offsetWidth if horizontal: true.