Skip to content
Browse docs and components

Infinite Masonry

infinite-masonry

An endless photo feed in balanced columns. Tiles reserve their space from the image size, so nothing shifts as pages arrive; the next page loads as the shortest column nears view; and it is an ARIA feed with Page Down between items. No virtualiser, no dependencies.

Responsive

Install

$npxshadcnadd@forme/infinite-masonry

Adds the component, its registry dependencies, and the token stylesheet you import once.

API reference

Read from the source, so it is the API of the file you install. A prop marked * is required.

InfiniteMasonry

An endless photo feed in balanced columns.

PropTypeDefaultDescription
title*string—
items*readonly MasonryItem[]—
hasMore*boolean—Whether another page exists. When false, the feed ends and says so.
onLoadMore*() => void—Called when the shortest column nears the viewport. Append the next page to items.
descriptionstring—
loadingbooleanfalse
errorstring | nullnullA message for the last failed load. While set, loading pauses until a retry.
onRetry() => void—Defaults to onLoadMore.
minColumnWidthnumber220
maxColumnsnumber4
classNamestring—