Fresh Scroll 🚀

A zero-dependency, TypeScript-ready infinite scroll component for React. Perfect for social feeds, product listings, and content streams with blazing fast performance!

This component is headless and does not include any styling. You have full control over the component's appearance.

Features

  • 🪶 Zero dependencies
  • 📦 TypeScript ready
  • ⚡️ Minimal and performant
  • 🎯 Simple API
  • 🔄 Built-in loading, error, and empty states
  • ⚙️ Customizable IntersectionObserver options

Installation

npm install fresh-scroll

Usage

 <FreshScroll
      components={{
        content: ContentCard,
        loader: <div>Loading...</div>,
        empty: retry => <button onClick={retry}>Retry</button>,
        error: retry => <button onClick={retry}>Retry</button>,
      }}
      loadNext={loadNextPromise}
    />