2.0.1 • Published 7 months ago

fresh-scroll v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Fresh Scroll 🚀

Link to documentation

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.

 <FreshScroll<ContentItem>
      containerProps={{
        className: "flex flex-col gap-4",
      }}
      components={{
        content: ContentCard,
        loader: <div>Loading...</div>,
        empty: retry => <button onClick={retry}>Retry</button>,
        error: retry => <button onClick={retry}>Retry</button>,
      }}
      loadNext={loadNext}
    />

Features

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

Documentation

Documentation

Installation

npm install fresh-scroll

or

yarn add fresh-scroll

or

pnpm add fresh-scroll

License

MIT © Daniel Bílek