Founding price: $35, then $79.99 after 23:59 UTC on 4 November, then $79.99
Get ProA full-screen photo viewer with pinch and double-tap zoom, swipe sideways to change photo, swipe down to close, arrow keys, buttons and a spoken position.
This item has no props to tune. Use the lens above to change theme, density, direction and more.
Use it to open a photo from a grid or a post at full screen on a phone, where people expect to pinch, swipe and flick it away.
Do not use it for video, or for a gallery that sits inline in the page (use a carousel). For a desktop-first lightbox with captions and thumbnails see the Lightbox component.
import { ImageViewer } from "@/components/ui/image-viewer"<ImageViewer
images={images}
open={open}
onOpenChange={setOpen}
index={index}
onIndexChange={setIndex}
/>| Part | Prop | Type | Default | Description |
|---|---|---|---|---|
ImageViewer | images | ViewerImage[] | required | { src, alt, caption? }. alt is required. |
ImageViewer | open / onOpenChange | boolean / (open) => void | required | Visibility. |
ImageViewer | index / onIndexChange | number / (index) => void | required | The photo shown. |
The component ships with a Testing Library test (image-viewer.test.tsx). jsdom has no touch or layout, so the test drives the component through its keyboard and pointer-free paths and checks roles, names and state.