None of the core Compose animation entry points are wrapped today. They're the standard way to add enter/exit transitions, value-keyed swaps, and crossfade in any non-static UI.
Missing composables
| Composable |
Kt class |
AnimatedVisibility |
AnimatedVisibilityKt |
AnimatedContent |
AnimatedContentKt |
Crossfade |
CrossfadeKt |
Notes
AnimatedVisibility takes EnterTransition / ExitTransition parameters — these are non-composable factory functions (fadeIn(), slideInVertically(), etc.) from EnterExitTransitionKt. The simplest first cut can just default both and let the runtime pick the default fade.
AnimatedContent takes a state value and a ContentTransform (built via togetherWith from enter+exit). The content lambda is @Composable (T) -> Unit — needs a generic-over-state-value shape on the C# side, or specialise it (AnimatedContent<int>).
Crossfade is the easiest of the three — Crossfade(targetState: T, content: @Composable (T) -> Unit). Probably the right one to ship first as a smoke test of the shape.
Approach
These have IFunction* content lambdas with a state-value parameter, so use ComposableLambdas.Wrap2 (or higher) to give Compose a stable identity per the project conventions in .github/copilot-instructions.md.
Tracking
Long-term dotnet/java-interop#1440.
None of the core Compose animation entry points are wrapped today. They're the standard way to add enter/exit transitions, value-keyed swaps, and crossfade in any non-static UI.
Missing composables
AnimatedVisibilityAnimatedVisibilityKtAnimatedContentAnimatedContentKtCrossfadeCrossfadeKtNotes
AnimatedVisibilitytakesEnterTransition/ExitTransitionparameters — these are non-composable factory functions (fadeIn(),slideInVertically(), etc.) fromEnterExitTransitionKt. The simplest first cut can just default both and let the runtime pick the default fade.AnimatedContenttakes a state value and aContentTransform(built viatogetherWithfrom enter+exit). The content lambda is@Composable (T) -> Unit— needs a generic-over-state-value shape on the C# side, or specialise it (AnimatedContent<int>).Crossfadeis the easiest of the three —Crossfade(targetState: T, content: @Composable (T) -> Unit). Probably the right one to ship first as a smoke test of the shape.Approach
These have
IFunction*content lambdas with a state-value parameter, so useComposableLambdas.Wrap2(or higher) to give Compose a stable identity per the project conventions in.github/copilot-instructions.md.Tracking
Long-term dotnet/java-interop#1440.