Creating Confetti Particle Effects Using SwiftUI

Add fireworks and confetti to your SwiftUI apps

Sarah
Better Programming
Published in
3 min readSep 23, 2021

--

firework and confetti particles swiftui. like button animation. congratulation screen. swift
Image by author

To get started, create a struct of type GeometryEffect.

We need to define time, speed, and direction for particles. Make the speed variable randomized number between 20 and 200. If you try a small number range (e.g. 10 … 30), the particles’ explosion will be more contained and…

--

--