Function

animationSpec

Applies an animation specification for shared bounds and visibility transitions to a component.

animationSpec

Source set: JvmAndAndroid
public fun RemoteModifier.animationSpec(
    animationId: Int = -1,
    motionSpec: RemoteTweenSpec = remoteTween(),
    visibilitySpec: RemoteTweenSpec = motionSpec,
    enter: RemoteEnterTransition = RemoteEnterTransition.FadeIn,
    exit: RemoteExitTransition = RemoteExitTransition.FadeOut,
): RemoteModifier

Applies an animation specification for shared bounds and visibility transitions to a component.

Parameters

animationId identifier used to match elements for shared transitions (-1 for auto)
motionSpec animation specification for motion/bounds transitions (e.g. remoteTween)
visibilitySpec animation specification for enter/exit visibility transitions
enter transition effect when component enters the layout
exit transition effect when component exits the layout

Return

a RemoteModifier that applies the animation specification

animationSpec

Source set: JvmAndAndroid
public fun RemoteModifier.animationSpec(
    animationId: Int,
    enabled: Boolean,
): RemoteModifier

Applies an animation specification to match elements for shared transitions across states.

Parameters

animationId identifier used to match elements for shared transitions
enabled whether animation transitions are enabled for this component

Return

a RemoteModifier that applies the animation specification

animationSpec

Source set: JvmAndAndroid
public fun RemoteModifier.animationSpec(enabled: Boolean): RemoteModifier

Enables or disables animation transitions for this component.

Parameters

enabled whether animation transitions are enabled for this component

Return

a RemoteModifier that enables or disables animation transitions

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: