Skip to Content
MavKitOne is in beta. @mav-labs-inc/mavkit-react is not public packages yet.
ComponentsLoad More

Load More

An infinite-scroll / “load more” trigger with a progress track and count. onLoad is awaited so the component can drive its own loading state.

Usage

import { LoadMore } from '@mav-labs-inc/mavkit-react' <LoadMore loaded={items.length} total={248} batchSize={20} onLoad={loadMoreItems} autoObserve />

Example

Click “Load more” — this demo simulates a 600ms fetch.

Props

PropTypeDefaultDescription
loadednumber0
totalnumber0
batchSizenumber20
autoObservebooleanfalseTrigger onLoad automatically when the component scrolls into view (via IntersectionObserver).
onLoad(batchSize: number) => Promise<void> | void—Load callback — awaited so the component can drive its own loading state.
classNamestring—
Last updated on