MaterialSharedAxisZ

fun <T> MaterialSharedAxisZ(targetState: T, forward: Boolean, modifier: Modifier = Modifier, label: String = "MaterialSharedAxisZ", content: @Composable AnimatedVisibilityScope.(T) -> Unit)(source)

MaterialSharedAxisZ allows to switch between two layouts with a shared Z-axis animation.

Parameters

targetState

is a key representing your target layout state. Every time you change a key the animation will be triggered. The content called with the old key will be faded out while the content called with the new key will be faded in.

forward

whether the direction of the animation is forward.

modifier

Modifier to be applied to the animation container.

label

An optional label to differentiate from other animations in Android Studio.

See also

com.google.android.material.transition.MaterialSharedAxis