Confetti is a comprehensive and customizable confetti view for iOS, built with Swift and UIKit. The set of views allows developers to easily integrate a dynamic confetti effect into their applications, enhancing interactivity and adding a festive mood to the user experience.
- Configurable Confetti Direction: The ConfettiView can emit confetti in different directions including left, right, top, and bottom.
- Customizable Emitters: Specify a list of emitter objects to control the appearance and behavior of the confetti particles.
- Animation Support: A default animation is available that applies gravity and birthrate animations to the confetti particles.
- Configuration API: Fine-tune particle count, spread, gravity, velocity, drift, scale, spin, lifetime, and more.
- Preset Configurations: Built-in presets for light, heavy, burst, gentle, fast, and slow effects.
- Reduced Motion Support: Optionally respect Reduce Motion to avoid emitting confetti.
let confetti = ConfettiView(
emitters: [
.shape(.rectangle, color: .systemYellow),
.shape(.circle, color: .systemPink),
.shape(.circle, color: .systemBlue)
],
direction: .top,
animation: .default,
configuration: .light
)
view.addSubview(confetti)
confetti.frame = view.bounds
confetti.emit()Use the built-in presets to get a polished effect quickly:
ConfettiConfiguration.lightConfettiConfiguration.heavyConfettiConfiguration.burstConfettiConfiguration.gentleConfettiConfiguration.fastConfettiConfiguration.slow
Use the default emitters with a single line:
ConfettiView.topConfettiView.leftConfettiView.rightConfettiView.bottom
While the views in Confetti are easy-to-use, they also offer a high degree of flexibility, catering to most confetti-related use cases. You might wish to extend or adapt them according to your specific requirements.
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2026-01-25.at.16.45.26.mp4
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2026-01-25.at.16.44.51.mp4
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2026-01-25.at.16.45.06.mp4
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2026-01-25.at.16.17.49.mp4
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2026-01-25.at.16.53.41.mp4
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2026-01-25.at.16.53.00.mp4
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2026-01-25.at.16.52.26.mp4
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2026-01-25.at.16.51.45.mp4
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2026-01-25.at.16.51.07.mp4
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2026-01-25.at.16.50.29.mp4
Licensed under the MIT license. See the LICENSE file for more info.