by @alexstyl
✉️ Leave your feedback

← Back to Compose Animation

Crossfade

Component
in
Compose Animation
. Since 0.1.0-dev15

Overview

Examples

Community Notes

@Composable
fun CrossfadeSample() {
    Crossfade(targetState = "A") { screen ->
        when (screen) {
            "A" -> Text("Page A")
            "B" -> Text("Page B")
        }
    }
}
Previous ComponentAnimatedVisibility
Next ComponentTransition