SwiftUI card animations

54 examples. Card animations built with SwiftUI. Cards that stack, flip, expand into detail pages, swipe away and rearrange — the backbone of modern app UI.

SwiftUI card animations: common questions

How do I build card 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 expand a card into a detail page?
Use a shared-element transition: matchedGeometryEffect in SwiftUI, layoutId in Framer Motion or the View Transitions API on the web, so the card grows into the page.
How do swipeable card stacks work?
The top card follows the drag with rotation based on horizontal offset; past a threshold it flies off with velocity and the next card springs forward.

Card animations in other frameworks

More SwiftUI animations