Holiday sale: 40% off Pro with code · limited offer · ends Dec 31
See ProA squircle photo grid whose tiles open with a shared-element zoom: the photo grows out of its exact tile into a full viewer over a blurred backdrop, with a glass top bar and a glass filmstrip whose active thumbnail widens on a spring. Inside the viewer you can pinch, scroll or double tap to zoom around the pointer, pan with rubber-banded bounds and momentum, swipe sideways between photos and pull down to dismiss, which shrinks the photo and flies it back into its tile. Escape, arrow keys and plus or minus work from the keyboard with a focus trap, and reduced motion swaps the springs for instant changes.
Included in Pro and aboveCompare plans
Live preview. Move the mouse, scroll and click inside the frame.
The copied code, markdown and prompt include the values you set here.
import { PhotoViewerZoom } from "@/components/hyperblur-pro/photo-viewer-zoom"
<PhotoViewerZoom />
<PhotoViewerZoom
demo={false}
photos={[{ src: "/big-1.jpg", thumb: "/small-1.jpg", title: "Harbor" }]}
onOpenChange={(i) => console.log(i)}
/>| Prop | Type | Default | Description |
|---|---|---|---|
| photos | { src, thumb?, title?, meta? }[] | 12 Unsplash landscapes | Photos of the grid and the viewer; thumb is used in tiles and the filmstrip. |
| title / subtitle | string | "Coastlines and ridges" | Album heading and helper text. |
| columns | number | 4 | Grid columns; some tiles span two rows or columns. |
| maxZoom | number | 4 | Largest zoom factor, with rubber banding past it while pinching. |
| demo | boolean | true | Open one photo shortly after mount to show the transition. |
| onOpenChange | (index: number | null) => void | undefined | Called when the viewer opens, changes photo or closes. |
| accent | string | "#ffffff" | Focus ring color inside the viewer. |
| refraction | number | 1 | Lens strength of the glass controls. |
Source code is included in Pro and above