Carregando…
Carregando…
Carregando…IntersectionObserver sentinel wrapper that triggers onLoadMore when visible.
Infinite Scroll — load more on sentinel intersection
$ npx kikitocn add infinite-scrollimport { InfiniteScroll } from "@/components/ui/cn/infinite-scroll/InfiniteScroll";
export function InfiniteScrollExample() {
return (
<InfiniteScroll />
);
}| Prop | Tipo | Padrão | Descrição |
|---|---|---|---|
children* | ReactNode | — | Itens já carregados |
onLoadMore* | () => void | — | Callback ao atingir o sentinel |
hasMore* | boolean | — | Indica se há mais itens para carregar |
isLoading | boolean | false | Estado de carregamento em curso |
threshold | number | 0 | Margem de disparo do IntersectionObserver |
loader | ReactNode | — | Componente exibido enquanto carrega |
endMessage | ReactNode | — | Mensagem exibida quando não há mais itens |
className | string | — | Classes CSS extras |