Component
Image viewer
A full-screen, swipeable photo viewer with drag-down-to-dismiss and paged dot indicators, layered over a near-opaque backdrop.
The primitive
image viewer.tsx
<NativeImageViewer images={images} open={open} onClose={() => setOpen(false)} />Example
Tapping a photo attached to a receipt opens it full-screen, with any other photos on the same transaction reachable by swipe.
image-viewer-example.tsx
<NativeImageViewer images={transaction.receiptPhotos} open={open} onClose={() => setOpen(false)} />Capabilities
| Prop | Type | Description |
|---|---|---|
| imagesrequired | string[] | — |
| initialIndex | number | — |
| openrequired | boolean | — |
| onCloserequired | () => void | — |
| alts | string[] | Alt text per image |