Use when implementing SwiftUI animations, understanding VectorArithmetic, using @Animatable macro, zoom transitions, UIKit/AppKit animation bridging, choosing between spring and timing curve animations, or debugging animation behavior - comprehensive animation reference from iOS 13 through iOS 26
View on GitHubCharlesWiltgen/Axiom
axiom
.claude-plugin/plugins/axiom/skills/axiom-swiftui-animation-ref/SKILL.md
January 16, 2026
Select agents to install to:
npx add-skill https://github.com/CharlesWiltgen/Axiom/blob/main/.claude-plugin/plugins/axiom/skills/axiom-swiftui-animation-ref/SKILL.md -a claude-code --skill axiom-swiftui-animation-refInstallation paths:
.claude/skills/axiom-swiftui-animation-ref/# SwiftUI Animation ## Overview Comprehensive guide to SwiftUI's animation system, from foundational concepts to advanced techniques. This skill covers the Animatable protocol, the iOS 26 @Animatable macro, animation types, and the Transaction system. **Core principle** Animation in SwiftUI is mathematical interpolation over time, powered by the VectorArithmetic protocol. Understanding this foundation unlocks the full power of SwiftUI's declarative animation system. ## When to Use This Skill - Implementing custom animated views or shapes - Understanding why a property doesn't animate (Int vs Float/Double) - Choosing between spring and timing curve animations - Using the @Animatable macro (iOS 26+) - Conforming views to the Animatable protocol - Debugging animation merging behavior - Optimizing animation performance - Creating multi-step or complex animations - Understanding model vs presentation values - Implementing custom animation algorithms - Adding zoom transitions for navigation/presentation (iOS 18+) - Animating UIKit/AppKit views with SwiftUI animations (iOS 18+) - Bridging animations through UIViewRepresentable (iOS 18+) - Building gesture-driven animations with velocity preservation ## System Requirements #### iOS 13+ for Animatable protocol #### iOS 17+ for default spring animations, scoped animations #### iOS 18+ for zoom transitions, UIKit/AppKit animation bridging #### iOS 26+ for @Animatable macro --- ## Part 1: Understanding Animation ### What Is Interpolation Animation is the process of generating intermediate values between a start and end state. #### Example: Opacity animation ```swift .opacity(0) → .opacity(1) ``` While this animation runs, SwiftUI computes intermediate values: ``` 0.0 → 0.02 → 0.05 → 0.1 → 0.25 → 0.4 → 0.6 → 0.8 → 1.0 ``` **How values are distributed** - Determined by the animation's timing curve or velocity function - Spring animations use physics simulation - Timing curves use bezier curves - Each animation typ