Interface: VirtualizerProps\
September 22, 2026 ยท View on GitHub
Interface: VirtualizerProps<T>
Defined in: src/vue/Virtualizer.tsx:38
Props of Virtualizer.
Extends
PublicProps
Type Parameters
T
T = unknown
Properties
data
data:
T[]
Defined in: src/vue/Virtualizer.tsx:42
The data items rendered by this component.
bufferSize?
optionalbufferSize?:number
Defined in: src/vue/Virtualizer.tsx:47
Extra item space in pixels to render before/after the viewport. The minimum value is 0. Lower value will give better performance but you can increase to avoid showing blank items in fast scrolling.
Default Value
200
itemSize?
optionalitemSize?:number
Defined in: src/vue/Virtualizer.tsx:54
Item size hint for unmeasured items in pixels. It will help to reduce scroll jump when items are measured if used properly.
- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases.
- If set, you can opt out estimation and use the value as initial item size.
shift?
optionalshift?:boolean
Defined in: src/vue/Virtualizer.tsx:58
While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling.
horizontal?
optionalhorizontal?:boolean
Defined in: src/vue/Virtualizer.tsx:62
If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list.
startMargin?
optionalstartMargin?:number
Defined in: src/vue/Virtualizer.tsx:66
The offset to the scrollable parent before virtualizer in pixels. If you put an element before virtualizer, you have to set its height to this prop.
ssrCount?
optionalssrCount?:number
Defined in: src/vue/Virtualizer.tsx:70
A prop for SSR. If set, the specified amount of items will be mounted in the initial rendering regardless of the container size until hydrated. The minimum value is 0.
scrollRef?
optionalscrollRef?:HTMLElement
Defined in: src/vue/Virtualizer.tsx:74
Reference to the scrollable element. The default will get the direct parent element of virtualizer.
as?
optionalas?: keyof IntrinsicElementAttributes
Defined in: src/vue/Virtualizer.tsx:79
Component or element type for container element.
Default Value
"div"
item?
optionalitem?: keyof IntrinsicElementAttributes
Defined in: src/vue/Virtualizer.tsx:84
Component or element type for item element.
Default Value
"div"
itemProps?
optionalitemProps?:ItemProps<T>
Defined in: src/vue/Virtualizer.tsx:90
A function that provides properties/attributes for item element
This prop will be merged into item prop in the future
keepMounted?
optionalkeepMounted?: readonlynumber[]
Defined in: src/vue/Virtualizer.tsx:94
List of indexes that should be always mounted, even when off screen.
cache?
optionalcache?:CacheSnapshot
Defined in: src/vue/Virtualizer.tsx:100
You can restore cache by passing a CacheSnapshot on mount. This is useful when you want to restore scroll position after navigation. The snapshot can be obtained from VirtualizerHandle.cache.
The length of items should be the same as when you take the snapshot, otherwise restoration may not work as expected.
onScroll?
optionalonScroll?: (offset) =>void
Defined in: src/vue/Virtualizer.tsx:105
Callback invoked whenever scroll offset changes.
Parameters
offset
number
Current scrollTop, or scrollLeft if horizontal: true.
Returns
void
onScrollEnd?
optionalonScrollEnd?: () =>void
Defined in: src/vue/Virtualizer.tsx:109
Callback invoked when scrolling stops.
Returns
void
key?
optionalkey?:PropertyKey
Defined in: node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1215
Inherited from
PublicProps.key
ref?
optionalref?:VNodeRef
Defined in: node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1216
Inherited from
PublicProps.ref
ref_for?
optionalref_for?:boolean
Defined in: node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1217
Inherited from
PublicProps.ref_for
ref_key?
optionalref_key?:string
Defined in: node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1218
Inherited from
PublicProps.ref_key
onVnodeBeforeMount?
optionalonVnodeBeforeMount?:VNodeMountHook|VNodeMountHook[]
Defined in: node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1219
Inherited from
PublicProps.onVnodeBeforeMount
onVnodeMounted?
optionalonVnodeMounted?:VNodeMountHook|VNodeMountHook[]
Defined in: node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1220
Inherited from
PublicProps.onVnodeMounted
onVnodeBeforeUpdate?
optionalonVnodeBeforeUpdate?:VNodeUpdateHook|VNodeUpdateHook[]
Defined in: node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1221
Inherited from
PublicProps.onVnodeBeforeUpdate
onVnodeUpdated?
optionalonVnodeUpdated?:VNodeUpdateHook|VNodeUpdateHook[]
Defined in: node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1222
Inherited from
PublicProps.onVnodeUpdated
onVnodeBeforeUnmount?
optionalonVnodeBeforeUnmount?:VNodeMountHook|VNodeMountHook[]
Defined in: node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1223
Inherited from
PublicProps.onVnodeBeforeUnmount
onVnodeUnmounted?
optionalonVnodeUnmounted?:VNodeMountHook|VNodeMountHook[]
Defined in: node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1224
Inherited from
PublicProps.onVnodeUnmounted
class?
optionalclass?:unknown
Defined in: node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1403
Inherited from
PublicProps.class
style?
optionalstyle?:unknown
Defined in: node_modules/@vue/runtime-core/dist/runtime-core.d.ts:1404
Inherited from
PublicProps.style