1.0.0 • Published 9 months ago
@artic-frost/fresh-scroll v1.0.0
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.
<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
Installation
npm install fresh-scrollor
yarn add fresh-scrollor
pnpm add fresh-scrollLicense
MIT © Daniel Bílek
1.0.0
9 months ago