Image Grid

An interactive gallery that lets users swap the hero image by clicking on thumbnails.

Preview

Image 1
Image 2
Image 3
Image 4
Image 5

Hero Right

Mountain 1
Mountain 2
Mountain 3
Mountain 4
Mountain 5

Hero Top

Beach 1
Beach 2
Beach 3
Beach 4
Beach 5

Installation

Use the CLI to add this component to your project.

npx shadcn@latest add https://ui.nyxhora.com/r/image-grid.json

Props

PropTypeDefaultDescription
itemsImageGridItem[]-Array of image objects {id, src, alt}
layout"hero-left" | "hero-right" | "hero-top""hero-left"The layout configuration
enableSwappingbooleantrueEnable swapping images on click