SwiftUI package for configurable confetti animation
open sourceMITfree
ConfettiSwiftUI is a Swift package that adds a configurable confetti animation to SwiftUI views, built entirely in SwiftUI. The confetti can be default shapes, emojis, SF Symbols or text, with its number, colors, size, spread and timing set through parameters, and any change to a state variable fires it again, with a haptic on each burst.
Problems it solves
- show a confetti burst in my SwiftUI app when a user finishes a task
- celebrate a purchase with emoji confetti on iOS
- add a party animation to a button tap in SwiftUI without writing particle code
Features
- confetti from default shapes, emojis, SF Symbols or text
- number, colors, size, radius and timing set as parameters
- fires on any change of a state variable, as often as you like
- a haptic on each explosion
- pure SwiftUI, installed with Swift Package Manager
