SharedTransitionScope

Functions summary

Functions

SharedTransitionScope

@Composable
fun SharedTransitionScope(content: @Composable SharedTransitionScope.(Modifier) -> Unit): Unit

SharedTransitionScope creates a SharedTransitionScope for the child layouts in content. Any child (direct or indirect) of the SharedTransitionLayout can use the receiver scope SharedTransitionScope to create shared element or shared bounds transitions. SharedTransitionScope will not creates a new Layout.

IMPORTANT: It is important to set the Modifier provided to the content on the first and top-most child, as the Modifier both obtains the root coordinates and creates an overlay. If the first child layout in content isn't the child with the highest zIndex, consider using SharedTransitionLayout instead.

Parameters
content: @Composable SharedTransitionScope.(Modifier) -> Unit

The children composable to be laid out.