# Image Zoom A thumbnail that opens its full-size source in a dialog, with a caption and the focus behaviour a dialog owes its trigger. ## Installation ```bash npx shadcn@latest add litingyes/blocove/image-zoom ``` The trigger is a real button and the large image opens in a dialog, so Escape closes it, the focus stays inside it and returns to the trigger when it closes. `sizes`, `widths` and `transform` apply to the trigger image, so a gallery preview stays responsive; `thumbnailSrc` keeps the trigger light while the dialog requests the full image at 100vw by default. ## API Reference ### ImageZoom A thumbnail that opens the full-size source in a dialog. The dialog owns the focus behaviour; the item owns the composition. | Prop | Type | Default | | --- | --- | --- | | `src` | `string` | `Required` | | `alt` | `string` | `Required` | | `thumbnailSrc` | `string` | `src` | | `caption` | `ReactNode` | - | | `aspectRatio` | `number | string` | - | | `width` | `number` | - | | `height` | `number` | - | | `priority` | `boolean` | `false` | | `sizes` | `string` | `'100vw' in the dialog` | | `widths` | `readonly number[]` | - | | `transform` | `(src, width) => string` | `Identity` | | `placeholder` | `string` | - | | `zoomLabel` | `string` | `Zoom image: ` | | `triggerClassName` | `string` | - | | `className` | `string` | - | ## Registry dependencies - `litingyes/blocove/image` - `dialog` Namespace: `npx shadcn@latest add @blocove/image-zoom`