SwiftUI animations

135 examples. iOS interface animations built with SwiftUI: springs, matched geometry, keyframes, haptics and Metal effects. Each clip comes with a prompt your AI agent can follow to rebuild it in SwiftUI.

SwiftUI animations: common questions

What's the best way to animate in SwiftUI?
Use withAnimation with a spring, for example .spring(response: 0.35, dampingFraction: 0.8), for most state changes. Reach for matchedGeometryEffect when an element moves between views, PhaseAnimator or KeyframeAnimator for multi-step sequences, and contentTransition(.numericText()) for changing numbers.
How do I make SwiftUI animations feel native?
Prefer springs over fixed durations, keep animations interruptible, add sensoryFeedback for haptics at the moment of commitment, and respect accessibilityReduceMotion by swapping movement for fades.
Can AI build these SwiftUI animations?
Yes. Copy a clip's prompt or send it straight to Claude Code, Cursor or Codex. Prompts describe layout, timing and spring values, and link a keyframe sheet so the agent can match the motion.

SwiftUI by category

Other frameworks