Masonry Grid
A responsive masonry-style image grid with hover animations and lightbox support.
Install using CLI
npx shadcn@latest add "https://obsidianui.dev/r/masonry-grid.json"Install Manually
1
Install dependencies
2
Add util file
Create a file lib/utils.ts:
3
Copy the source code
Copy the code into components/ui/masonry-grid.tsx
Usage
Props
| Prop Name | Type | Default | Description |
|---|---|---|---|
| images | string[] | - | Array of image URLs |
| columns | number | 3 | Number of columns |
