SwiftUI particle effects

6 examples. Particle effects built with SwiftUI. Confetti, sparks, dust, dissolves and other particle effects that reward actions.

SwiftUI particle effects: common questions

How do I build particle effects 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 make a disintegrate or dust effect?
Sample the element's pixels into particles, then move them with noise and fade them out — canvas or a shader handles thousands smoothly.
When should I use particles?
Sparingly: for rewards and moments of delight, not routine actions.

Particle effects in other frameworks

More SwiftUI animations