nalarx-ui
Components

Lazy more

The load-more trigger at the foot of a paged list.

bunx shadcn@latest add @nalarx/lazy-more

Usage

It loads the next page by itself when scrolled into view, one page per scroll: after a page lands it waits until it has left the viewport before asking again. It stays a real button, so keyboard users and browsers without IntersectionObserver still reach the next page.

<LazyMore busy={isFetchingNextPage} onLoad={fetchNextPage} label="Load more members" loadingLabel="Loading more members" />

Click to toggle busy (the demo has auto off):

Props

PropTypeDefault
busybooleanA page is on its way.
onLoad() => void
label, loadingLabelstringAccessible names, idle and busy.
rows(number | string)[][86, 64, 74]Bar widths; numbers are %.
dotbooleantrueA dot before each bar.
autobooleantrueOff when another page would add nothing visible.

Replaces

LazyMore.tsx in both apps.

On this page