Navigation and sheets

ZoomTransition

A push that grows out of the view it was opened from, and shrinks back into it.

iOSUIKit zoom transitionAndroidMaterial container transformReact Native tier — renders anywhere
iOSUIKit zoom transition
AndroidMaterial container transform

Import

ts
import {ZoomTransition, ZOOM_TRANSITION_PARAM, useZoomTransitionParam, useZoomTransitionSourceId, withZoomTransition} from '@hzblj/kara-ui/router'

ZoomTransition.Source

PropTypeDescription
children*ReactElement

A single view — the photo or card the zoom grows from.

androidZoomTransitionSourceAndroidOptions

Android-only settings.

identifierstring

Unset renders children alone: no zoom from here. Use useZoomTransitionSourceId for one unique per item.

children*
ReactElement

A single view — the photo or card the zoom grows from.

android
ZoomTransitionSourceAndroidOptions

Android-only settings.

identifier
string

Unset renders children alone: no zoom from here. Use useZoomTransitionSourceId for one unique per item.

ZoomTransition.Enabler

PropTypeDescription
androidZoomTransitionEnablerAndroidOptions

Android-only settings: Material's container transform.

iosZoomTransitionEnablerIosOptions

iOS-only settings: UIKit's zoom.

scrimColorToken

Laid over the screen behind the zoomed one. Unset: UIKit's own dimming on iOS, none on Android.

sourceIdentifierstring

The source's identifier, handed over in the route params. Unset renders nothing: the push stays the stack's own.

android
ZoomTransitionEnablerAndroidOptions

Android-only settings: Material's container transform.

ios
ZoomTransitionEnablerIosOptions

iOS-only settings: UIKit's zoom.

scrim
ColorToken

Laid over the screen behind the zoomed one. Unset: UIKit's own dimming on iOS, none on Android.

sourceIdentifier
string

The source's identifier, handed over in the route params. Unset renders nothing: the push stays the stack's own.

ZoomTransition.Target

PropTypeDescription
children*ReactElement

A single view — what the source lands on in the pushed screen.

androidZoomTransitionTargetAndroidOptions

Android-only settings.

identifierstring

The source's identifier, handed over in the route params. Unset renders children alone.

iosZoomTransitionTargetIosOptions

iOS-only settings.

children*
ReactElement

A single view — what the source lands on in the pushed screen.

android
ZoomTransitionTargetAndroidOptions

Android-only settings.

identifier
string

The source's identifier, handed over in the route params. Unset renders children alone.

ios
ZoomTransitionTargetIosOptions

iOS-only settings.

Platform notes

  • iOS 18: UIKit’s zoom transition, with the interactive dismissal. Below iOS 18 the push stays a slide. Android: Material’s container transform, both ways.
  • Three pieces tied by one identifier, which travels in the route params.
  • The enabler renders first and unconditionally — behind a loading state, the push is already a slide.
  • Zooming into a modal, give it no native header on iOS: a modal’s bar lives in a nested stack, which the zoom does not reach. Draw a close of your own; a drag down closes it too.
  • Settings both platforms honour sit at the top; the rest is typed apart under ios and android.