Infinite Masonry
- from @karaui
- by kara <ztzyrant@gmail.com>
A masonry grid for feeds of unknown length: it measures each card's real height, renders only what is near the viewport with TanStack Virtual, picks a column count from the container width and fetches the next page before the reader runs out.
Install
New to shadcn? Set up your project
If your project already has a shadcn components.json, skip initialization. Otherwise, run this once from your project root.
pnpm dlx shadcn@latest initpnpm dlx shadcn@latest add @karaui/infinite-masonryRegistry dependencies0
The CLI adds no other registry items with this one.
