Skip to content

Virtual Scroll โ€‹

A generic virtual scrolling container [ยง38.1].

  • Tag: <flint-virtual-scroll>
  • Class: FlintVirtualScroll

Import โ€‹

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintVirtualScroll } from '@getufy/flint-ui';

Usage โ€‹

html
<flint-virtual-scroll></flint-virtual-scroll>

Properties โ€‹

PropertyAttributeTypeDefaultDescription
itemsitemsT[][]Array of data items to render.
itemHeightitem-heightnumber40Fixed height of each item in pixels. Used for position calculations.
overscanoverscannumber5Number of extra items to render above and below the visible area.
renderItemrenderItemRenderItemFn&lt;T&gt;โ€”Render function for a single item. Receives the item and its index.

Slots โ€‹

NameDescription
(default)Fallback content shown when items is empty.