Display
Image zoom
Click an image to see it full screen over a blurred backdrop, on react-medium-image-zoom.
packages/design-system/components/ui/image-zoom.tsx
Examples

Anatomy
- 01Wrapper
- 02The image, zoom-in cursor
- 03Dialog, blurred background/80
- 04Unzoom button
Usage
import { ImageZoom } from "@repo/design-system/components/ui/image-zoom";
import Image from "next/image";
<ImageZoom>
<Image src={src} alt="The homepage on a phone" width={768} height={612} />
</ImageZoom>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| isZoomed / onZoomChange | boolean / (zoomed: boolean) => void | none | Control it from outside. |
| zoomMargin | number | 0 | Space around the zoomed image. |
| backdropClassName | string | none | Added to the dialog, after the blurred backdrop. |
| className | string | none | Merged last with cn(). Use it for layout (width, margin), not to restyle the component. |
Guidance
Do
- Use it on screenshots and detail shots people will want to inspect.
Don't
- Use it on images that are already full width.