compose-motion

Solid

Jetpack Compose animation foundations - animate*AsState, AnimatedVisibility, Crossfade, updateTransition, SharedTransitionLayout, gestures.

Web & Frontend 115 stars 14 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
69
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Compose Motion - Sub-skill > Jetpack Compose animation core. Loaded for Android Compose and Compose Multiplatform projects. > Concise rules here. Deep-dive in `references/`. > Baseline: current stable Jetpack Compose (1.7+). Modern stable APIs only - no `swipeable`, no `animateContentSize` hacks where `AnimatedContent` is correct. --- ## API Decision Tree | Need | API | |---|---| | Single value over time | `animateFloatAsState`, `animateDpAsState`, `animateColorAsState`, etc. | | Visibility / mount-unmount | `AnimatedVisibility(visible) { ... }` | | Crossfade between states | `Crossfade(target) { state -> ... }` | | Multi-state coordinated | `updateTransition(target).animateFloat { ... }` | | Manual control / interruption | `Animatable(initialValue)` + `animateTo(...)` | | Looping / infinite | `rememberInfiniteTransition().animateFloat(...)` | | Shared elements | `SharedTransitionLayout` + `Modifier.sharedElement(...)` (Compose 1.7+) | | Layout swap with anim | `AnimatedContent(target) { ... }` | | Drag / swipe | `Modifier.draggable` + `Animatable.snapTo`/`animateTo`, or `Modifier.anchoredDraggable` for snap-points | **Rule:** climb the ladder only when needed. `animate*AsState` covers 70% of cases. Reach for `Animatable` only when you need to interrupt, chain, or read velocity. --- ## Spring API (opinionated defaults) | Use | Spec | |---|---| | UI snap (modal, drawer, tab) | `spring(stiffness = Spring.StiffnessMediumLow, dampingRatio = Spring.DampingRatioNoBouncy)`...

Details

Author
AThevon
Repository
AThevon/genjutsu
Created
4 months ago
Last Updated
3 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category