SwiftUI morph animations

19 examples. Morph animations built with SwiftUI. Shapes and components that morph into each other: buttons into menus, toasts into pagination, icons into icons.

SwiftUI morph animations: common questions

How do I build morph animations in SwiftUI?
Pick an example below, copy its prompt (or send it to Claude Code, Cursor or Codex) and your agent builds it in SwiftUI. Each prompt lists the layout, timing and easing, and links a keyframe sheet of the motion. 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 morph one component into another?
Give both the same shared id (layoutId in Framer Motion, matchedGeometryEffect in SwiftUI) and animate size, radius and position together.
Icon swap or icon morph?
Morph when the two icons are related (play → pause); a quick cross-fade with scale is clearer for unrelated icons.

Morph animations in other frameworks

More SwiftUI animations