A SwiftUI View that emits confetti with user-defined shapes, images, and text.
ConfettiView is available through Swift Package Manager
- In Xcode choose
File -> Swift Packages -> Add Package Dependency...
- Paste this Github URL (https://github.com/ziligy/ConfettiView ) into the search bar and click Next.
- When repository displays, click Next.
- When loaded, click Finish.
import SwiftUI
import ConfettiView
struct ContentView: View {
let confettiView = ConfettiView( confetti: [
.text("🎉"),
.text("💪"),
.shape(.circle),
.shape(.triangle),
])
var body: some View {
confettiView
}
}
see included example for:
- timed-celebration
- fade out
- including images
inspiration and code influences