Shared Element Transition in Jetpack Compose

Introduction to the API

This introduces three new things:

  1. SharedTransitionLayout — This is required to enable the transition animation between the composables.
  2. Modifier.sharedElement() — This should be used when you need to match the other composable.
  3. Modifier.sharedBounds() — This should be used as the container bounds for where the transition should take place.

Screenshots

photo_2024-11-13_21-30-53