Infinite Scroll
A high-performance viewport intersection wrapper designed to dynamically append items as the user scrolls, built using the Intersection Observer API.
Preview
Installation
Design Variants
Explore the 5 premium styling configurations for Infinite Scroll list items, featuring custom card borders, glows, brutalist shadows, matrix scanlines, and custom loading triggers.
Glassmorphism
Neon Glow
Retro Brutalist
Cyberpunk Matrix
Premium Layout & Image Demos
Here are 3 distinct layouts demonstrating vertical card pairs, horizontal slider feeds, and grid-based image galleries.
[!NOTE] This demo requires
lucide-reactfor icon visuals. Install it using:npm install lucide-react
Component Concept
Vibe UI's InfiniteScroll component provides dynamic pre-fetching and smooth content insertion. Powered by the Intersection Observer API, it listens for scroll intersections to trigger data loading requests seamlessly.
Key Attributes & Options
hasMore(Required):boolean— Whether there are more items left to load.isLoading(Required):boolean— Current fetching status to prevent concurrent triggers.loadMore(Required):() => void— Callback trigger function called when scrolled past threshold bounds.threshold:number(default0.1) — Value from 0 to 1 indicating intersection visibility percentage.rootMargin:string(default'100px') — Viewport margin boundaries to trigger loading before items touch the edge.direction:'vertical' | 'horizontal'(default'vertical') — Direction of the list layout scroll axis.triggerIndex:number— Index in children array to insert intersection trigger, enabling pre-fetching.showScrollButtons:boolean(defaultfalse) — Renders sticky left/right arrow chevrons for horizontal scrolling.scrollAmount:number(default300) — Distance in pixels to scroll container when navigation arrows are clicked.