# Image Gallery A selected image with a thumbnail grid: arrow-key navigation, aria-current and the zoom view on the selected picture. ## Installation ```bash npx shadcn@latest add litingyes/blocove/image-gallery ``` The selected picture keeps the zoom behaviour of `ImageZoom`; the thumbnails are one roving-focus group. Arrow keys wrap around the set, Home and End jump to the edges, and the selected thumbnail carries `aria-current` so the state is exposed to assistive technology as well as sighted users. ## API Reference ### ImageGallery A selected image with a thumbnail grid. Clicking a thumbnail selects it; the keyboard moves the selection and the focus together. | Prop | Type | Default | | --- | --- | --- | | `images` | `readonly ImageGalleryItem[]` | `Required` | | `defaultIndex` | `number` | `0` | | `columns` | `2 | 3 | 4` | `3` | | `aspectRatio` | `number | string` | - | | `widths` | `readonly number[]` | - | | `transform` | `(src, width) => string` | `Identity` | | `sizes` | `string` | - | | `label` | `string` | `'Image gallery'` | | `className` | `string` | - | ### ImageGalleryItem One image in the set. | Prop | Type | Default | | --- | --- | --- | | `src` | `string` | `Required` | | `alt` | `string` | `Required` | | `thumbnailSrc` | `string` | `src` | | `caption` | `ReactNode` | - | ## Registry dependencies - `litingyes/blocove/image` - `litingyes/blocove/image-zoom` - `button` Namespace: `npx shadcn@latest add @blocove/image-gallery`