Infinite Scroll
Basic Infinite Scroll
Simple infinite scroll with basic items and loading state.
Loaded: 10 items
Has more: Yes
Social Media Feed
Infinite scroll for social media posts with rich content.
John Doe
•2024-01-15Getting Started with React
React is a powerful library for building user interfaces. Here are some tips to get started...
Jane Smith
•2024-01-14Beautiful Sunset Photography
Captured this amazing sunset during my trip to the mountains. Nature never fails to amaze!
Product Catalog
E-commerce style infinite scroll for product listings.
Wireless Headphones
Coffee Mug
Loading more products...
Notifications List
Infinite scroll for notifications with different types and states.
Your order has been shipped
New comment on your post
Custom Loading States
Infinite scroll with custom loading animations and states.
Custom Item 1
Enhanced content with custom styling
Custom Item 2
Enhanced content with custom styling
Custom Item 3
Enhanced content with custom styling
Custom Item 4
Enhanced content with custom styling
Custom Item 5
Enhanced content with custom styling
Custom Item 6
Enhanced content with custom styling
Custom Item 7
Enhanced content with custom styling
Custom Item 8
Enhanced content with custom styling
Infinite Scroll Summary
Overview of all infinite scroll implementations and their current states.
Basic Items
Simple items loaded
Social Posts
Posts in feed
Products
Products listed
Notifications
Notifications shown
Name | Type | Default | Details |
---|---|---|---|
next | function | Required | Function to load next set of data. |
hasMore | boolean | Required | Whether there is more data to load. |
children | React.ReactNode | Required | Content to display in the scroll container. |
loader | React.ReactNode | Required | Loading indicator component. |
scrollThreshold | number | string | Optional | Threshold for triggering next load. |
endMessage | React.ReactNode | Optional | Message to show when no more data. |
style | CSSProperties | Optional | Custom styles for the container. |
height | number | string | Optional | Height of the scroll container. |
scrollableTarget | HTMLElement | string | null | Optional | Target element for scrolling. |
hasChildren | boolean | Optional | Whether container has children. |
inverse | boolean | Optional | Whether to use inverse scrolling. |
pullDownToRefresh | boolean | Optional | Enable pull to refresh functionality. |
pullDownToRefreshContent | React.ReactNode | Optional | Content for pull to refresh. |
releaseToRefreshContent | React.ReactNode | Optional | Content for release to refresh. |
pullDownToRefreshThreshold | number | Optional | Threshold for pull to refresh. |
refreshFunction | function | Optional | Function to call on refresh. |
onScroll | (e: Event) => any | Optional | Scroll event handler. |
dataLength | number | Required | Length of current data array. |
initialScrollY | number | Optional | Initial scroll position. |
className | string | ' ' | You can customise by passing tailwind classes. |
aria-label | string | Optional | ARIA label for accessibility. |