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
- Micro-interactions73
- Screen & page transitions68
- Card animations54
- Spring animations32
- 3D UI animations28
- Input & form animations20
- Morph animations19
- Gradient & glow animations17
- Onboarding animations16
- Chart & data animations12
- Carousel animations11
- Text animations10
- Slider animations10
- Button animations9
- Menu & navigation animations9
- Particle effects6
- Checkbox animations5
- Toggle & switch animations4