lightboxShouldDismiss
Whether a drag down that ended here closes the viewer.
packages/ui-native/src/components/lightbox-zoom.tsx
@marktiderman/genesis-ui-nativeimport { lightboxShouldDismiss } from "@marktiderman/genesis-ui-native";react-docgen-typescript.lightboxShouldDismiss
Whether a drag down that ended here closes the viewer.
No declared props.
lightboxPinchScale
The zoom a pinch has reached: from where it started, by how far the fingers spread.
No declared props.
lightboxTouchDistance
Points between two touches.
No declared props.
lightboxPanLimit
How far a zoomed photo may pan before an edge shows, per axis.
No declared props.
NativeZoomablePhoto
The page: iOS's zooming scroll view, or Android's pinch and pan.
| Prop | Type | Default | Description |
|---|---|---|---|
| active* | boolean | — | The page on screen: another page resets its zoom. |
| height* | number | — | |
| onDismiss* | () => void | — | |
| onPull* | ((dy: number) => void) | null | — | How far it's pulled down, for the backdrop's fade; null when swiping down doesn't close. |
| onTap* | () => void | — | A single tap (shows or hides the viewer's chrome). |
| onZoomChange* | (zoomed: boolean) => void | — | |
| src* | string | — | |
| testID* | string | — | |
| width* | number | — | |
| alt | string | — | |
| cacheKey | string | — | Caches the photo under this key instead of its URL (`NativeImage`'s `cacheKey`). |
| zoomable | boolean | — | Pinch and double-tap zoom (on by default). Off, the page still pulls down to close. |
LIGHTBOX_DISMISS_DISTANCE
Points pulled down (or dragged, on Android) that close the viewer on release.
No declared props.
LIGHTBOX_DISMISS_VELOCITY
Or a quick flick down, in points per millisecond.
No declared props.
LIGHTBOX_MAX_ZOOM
How far a photo zooms in.
No declared props.
LIGHTBOX_DOUBLE_TAP_MS
Between two taps (each fires on release) for a double tap: a quick one measured 330ms apart on iOS.
No declared props.