public object HorizontalSharedAxisNavigationTransitions
Provides horizontal shared axis navigation transforms adhering to Material 3 motion specifications.
Use these animations for transitions between destinations with a spatial or directional relationship, such as moving forward and backward through a screen hierarchy or sequential flow. Incoming and outgoing destinations move simultaneously along a shared horizontal (x) axis to reinforce their spatial relationship.
These animations are consistent with the default system cross-activity navigation animations. See Material 3 transition patterns.
Properties
scrimColor
public val scrimColor: Color
The recommended scrim color for horizontal shared axis predictive back transitions.
Uses ColorScheme.scrim as the base color and adjusts its opacity based on the luminance of ColorScheme.onSurface.
Functions
forwardTransform
public fun forwardTransform(): ContentTransform
Creates a ContentTransform for a forward horizontal shared axis transition.
backwardTransform
public fun backwardTransform(): ContentTransform
Creates a ContentTransform for the commit phase of a horizontal shared axis backward transition.
predictiveBackTransform
public fun predictiveBackTransform(
backEvent: () -> NavigationEvent,
density: Density,
scrimColor: Color,
): MutableContentTransform
Creates a MutableContentTransform configured for the gesture phase of a horizontal shared axis predictive back transition.
Parameters
| backEvent | provider of the ongoing NavigationEvent. |
| density | the Density used to convert display bounds margins to pixels. |
| scrimColor | color of the scrim overlay applied to the entering content. Use HorizontalSharedAxisNavigationTransitions.scrimColor for the recommended scrim color that adapts to the theme. |