Skip to content

Virtual Scroller

Virtualizes long lists with fixed-height items.

Usage

vue
<script setup>
import { ArchVirtualScroller } from "@archora/ui";

const items = Array.from({ length: 1000 }, (_, index) => ({ id: index, label: "Item " + index }));
</script>

<template>
  <ArchVirtualScroller :items="items" :item-height="40" style="height: 320px" v-slot="{ item }">
    {{ item.label }}
  </ArchVirtualScroller>
</template>

Live sandbox

Virtual Scroller can be tested directly on this page.

interactive
Virtual list loads in the browser.
<ArchVirtualScroller :items="items" :item-height="40" />

Props

PropTypeDefaultDescription
itemsunknown[]-Item collection.
itemHeightnumber-Fixed item height.

Slots

SlotPropsDescription
defaultRenders a visible item.