How nomanr/animate-compose works
animate-compose is a Kotlin Multiplatform Compose library for applying ready-made or custom keyframe animations to composable content. The main workflow is a caller wrapping UI in Animated, which drives animation progress and applies a preset’s transform modifier. Presets span attention effects, entrances, exits, and special categories; custom presets use the same keyframe mechanism. The tree and README establish broad preset/platform capabilities, while sampled source confirms runtime wiring and transform resolution; the playground is documented but absent from this tree, so it is not mapped.
Main entry points: AnimationPreset.kt Preset contract · Animated.kt Animated wrapper · AnimateKeyframeModifier.kt Transform modifier · Keyframe.kt Keyframe model
Components 20
Compose API
- Animated wrapper
animate-compose/src/commonMain/kotlin/com/nomanr/animate/compose/animated/Animated.kt - Animation state
animate-compose/src/commonMain/kotlin/com/nomanr/animate/compose/animated/Animated.kt - Animation callbacks
animate-compose/src/commonMain/kotlin/com/nomanr/animate/compose/animated/AnimationCallbacks.kt
Keyframe Engine
- Preset contract
animate-compose/src/commonMain/kotlin/com/nomanr/animate/compose/core/AnimationPreset.kt - Keyframe model
animate-compose/src/commonMain/kotlin/com/nomanr/animate/compose/core/Keyframe.kt - Transform modifier
animate-compose/src/commonMain/kotlin/com/nomanr/animate/compose/core/AnimateKeyframeModifier.kt - Keyframe utilities
animate-compose/src/commonMain/kotlin/com/nomanr/animate/compose/core/KeyframeAnimationUtils.kt - Easing functions
animate-compose/src/commonMain/kotlin/com/nomanr/animate/compose/core/Easings.kt - Layout information
animate-compose/src/commonMain/kotlin/com/nomanr/animate/compose/core/NeedsLayoutInfo.kt - Animation tokens
animate-compose/src/commonMain/kotlin/com/nomanr/animate/compose/tokens/AnimationTokens.kt
Animation Presets
- Attention effects
animate-compose/src/commonMain/kotlin/com/nomanr/animate/compose/presets/attentionseekers - Entrance presets
animate-compose/src/commonMain/kotlin/com/nomanr/animate/compose/presets - Exit presets
animate-compose/src/commonMain/kotlin/com/nomanr/animate/compose/presets - Special effects
animate-compose/src/commonMain/kotlin/com/nomanr/animate/compose/presets/specials
Platform Support
- Container dimensions
animate-compose/src/commonMain/kotlin/com/nomanr/animate/compose/core/ContainerSize.kt - Android sizing
animate-compose/src/androidMain/kotlin/com/nomanr/animate/compose/core/ContainerSize.android.kt - Skiko sizing
animate-compose/src/skikoMain/kotlin/com/nomanr/animate/compose/core/ContainerSize.skiko.kt
Other components
- Compose caller
- Composable content
- Animated UI
Connections 19
- Compose caller → Animated wrapper: wraps content
- Compose caller → Animation state: controls
- Animated wrapper → Animation state: advances state
- Animated wrapper → Preset contract: requests modifier
- Animated wrapper → Composable content: measures and places
- Animated wrapper → Animated UI: renders
- Preset contract → Transform modifier: applies transforms
- Transform modifier → Keyframe model: resolves frames
- Transform modifier → Animated UI: transforms
- Entrance presets → Preset contract: implements
- Exit presets → Preset contract: implements
- Attention effects → Preset contract: implements
- Special effects → Preset contract: implements
- Keyframe utilities → Keyframe model: uses
- Keyframe model → Easing functions: uses easing
- Preset contract → Container dimensions: accepts dimensions
- Android sizing → Container dimensions: provides sizing
- Skiko sizing → Container dimensions: provides sizing
- Animation callbacks → Animation state: observes animation