Snap Back Zoomable Box
A container that makes its content zoomable with snap-back behavior while allowing the zoomed content to escape the clipping bounds of its parent.
Pinch zoom and pan gestures are supported; when the pointers are released the content animates back to its original size and position.
While a gesture is in progress (including the snap-back animation), content is rendered as an overlay over a scrim background. If this box is nested inside a SnapBackZoomableOverlayHost, the overlay lives in that host (and may extend across system bar areas); otherwise it falls back to a platform Popup.
Example:
SnapBackZoomableBox(modifier = Modifier.fillMaxSize()) {
AsyncImage(model = url, modifier = Modifier.fillMaxSize())
}Parameters
The modifier applied to the anchor area (the original touch target).
A ZoomState object. Defaults to rememberZoomState.
Color painted behind the zoomed content. Its alpha is multiplied by the zoom progress so the scrim fades in as the user zooms past 1x and fades out during the snap-back animation. Pass Color.Transparent to disable.
Called when a single tap is detected.
The zoomable content.