InfiniteScroll
Manual load-more enhanced by optional viewport observation.
Interactive preview
- Activity record 1
- Activity record 2
- Activity record 3
Usage
import { InfiniteScroll } from "@devvy-ui/react";
<InfiniteScroll label="Activity feed" hasMore={hasMore} onLoadMore={loadMore}>{items}</InfiniteScroll>API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| hasMore | boolean | required | Whether more records exist. |
| onLoadMore | () => void or Promise<void> | required | Application request. |
| loading / automatic | boolean | false | External busy state and optional observation. |
Accessibility & behavior
Platform Behavior & Guidelines
The native load-more/retry button is always the fallback. Concurrent requests are suppressed, errors are announced, and completion after unmount does not update state. Automatic observation is opt in.
Source ownership
Run npx @devvy-ui/cli init once in your React project, then add the source:
npx @devvy-ui/cli add infinite-scrollMake the source yours.
Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.
Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.