Skip to content
  • Web

Infinite Scroll

An Infinite Scroll component is a user interface feature that automatically loads and displays additional content as the user scrolls down a page. Instead of traditional pagination, this component creates a seamless browsing experience by continuously appending new items, such as images or articles, when the user reaches the bottom of the viewport. This enhances user engagement and keeps the content flow uninterrupted, making it ideal for applications like social media feeds, product galleries, and news websites.

Live examples

Example.tsx

Attributes

NList attributes
NameTypeDefaultDetails
datareadonly T[]Optional
renderItem(info: NListRenderItemInfo<T>) => ReactNodeRequired
keyExtractor((item: T, index: number) => string)Optional
heightnumberOptional
itemSizenumberOptionalExact row height in logical points, including any separator.
estimatedItemSizenumberOptionalRust measures row content when itemSize is omitted.
numColumnsnumberOptional
onEndReached((info: { distanceFromEnd: number; }) => void)Optional
onEndReachedThresholdnumberOptionalDistance to the end as a fraction of the viewport height. Default: 0.5.
ListEmptyComponentReactElement<unknown, string | React.JSXElementConstructor<any>> | ComponentType | nullOptional
onRefresh(() => void)Optional
refreshingbooleanOptional
classNamestringOptionalSupported Tailwind-style utilities, resolved entirely in Rust. See the engine README.
Engine reference for ListSet up engine components

Tags