Home

Awesome

ConfettiKit

ConfettiKit๐ŸŽ‰

CI Status Version Badges Platform Relative date Maintenance commit contributors Badge badge Badge Watchers

About ๐Ÿ“’

ConfettiKit is a custom framework used to add Confetti on your iOS/iPadOS projects. The kit provides variety of customisations inorder to design a confetti which matches your project's UI. ConfettiKit makes your work of adding Confetti on your project with just one line of code.

Playground ๐Ÿ’ป

Requirements โ•

Installation ๐ŸŒ

ConfettiKit is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ConfettiKit'

No CocoaPodsโ—๏ธ

Usage โš™๏ธ

  1. Import Library ๐Ÿ“š
import ConfettiKit
  1. Generate Confetti ๐ŸŽ‰
Confetti.generateConfetti(ConfettiPosition:Position, ConfettiCells:Int, ConfettiImage:[String], Colours:[UIColor], Scale:CGFloat ,BirthRate: Float, LifeTime:Float, Velocity:CGFloat, Spin:CGFloat, EmissionLongitude:CGFloat = CGFloat(Double.pi), EmissionRange:CGFloat, View: UIView)

Parameters ๐ŸŽ›

ParameterDefinition
ConfettiPositionPosition from which confetti Starts
ConfettiCellsTotal types of confetti element
ConfettiImageImage to apply on every Cells
ColoursColour to apply on every Cells
ScaleSize of cell
BirthRateCells produced in a sec
LifeTimeTotal existence of a cell
VelocitySpeed of cell
SpinRotation velocity of cell
EmissionLongitudelongitudinal orientation of the emission angle
EmissionRangeAngle(radians), defining a cone around the emission angle
ViewView on which Confetti is to be applied

Result ๐Ÿ’ฏ

Customization 1Customization 2Customization 3
<img src="https://user-images.githubusercontent.com/56252259/125240695-1070bf00-e308-11eb-9091-bba322642216.gif" width="250" height="500"/><img src="https://user-images.githubusercontent.com/56252259/125241249-d5bb5680-e308-11eb-96d2-00425b13896a.gif" width="250" height="500"/><img src="https://user-images.githubusercontent.com/56252259/125241369-f97e9c80-e308-11eb-83a4-a1627c9949f8.gif" width="250" height="500"/>

How to Stop Confetti ? โŒ

Confetti.stopConfetti()

Instructions ๐Ÿšฉ

  1. Images which are to be used in Confetti must be present in the Images.xcassets file.

  2. Change Rendering property of every Confetti Image to Template Image from Attribute Inspector.

    <img src="https://user-images.githubusercontent.com/56252259/125242393-3f883000-e30a-11eb-9412-11f1e7c297d8.png" width="250" height="120"/>
  3. While providing ConfettiImage & Colours do remember total number of Images and colours must be same to the number of ConfettiCells.

How to Contribute ๐Ÿ–‹

<!-- ## Project Admin ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป | <a href="https://gokulnair2001.wixsite.com/mysite"><img src="https://user-images.githubusercontent.com/56252259/115108478-482ccc80-9f8e-11eb-94a0-430db46a432f.png" width=150px height=160px /></a> | | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | | **[Gokul Nair](https://www.linkedin.com/in/gokul-r-nair/)** | | <a href="https://www.instagram.com/_gokul_r_nair_/"><img src="https://user-images.githubusercontent.com/56252259/114969025-24d22680-9e95-11eb-848d-b20e73269c4c.png" width="32px" height="32px"></a> <a href="https://twitter.com/itIsGokulNair"><img src="https://user-images.githubusercontent.com/56252259/114967867-d6bc2380-9e92-11eb-8f89-c437f39a45de.png" width="32px" height="32px"></a> <a href="https://www.linkedin.com/in/gokul-r-nair/"><img src="https://user-images.githubusercontent.com/56252259/114967871-d7ed5080-9e92-11eb-8781-cd7cf9bb52db.png" width="32px" height="32px"></a> | -->

License

ConfettiKit is available under the MIT license. See the LICENSE file for more info.

Like the Project ?

If you like using any of my projects or like what I'm doing, please do consider backing me with appreciating my work: Message me๐Ÿฅฐ

<img width="200" alt="BMC logo+wordmark - Black" src="https://cdn.buymeacoffee.com/buttons/v2/default-red.png">

OR

Drop a star โญ if you find this project interesting!

<p align="center" width="100%"> Made with โค๏ธ in ๐Ÿ‡ฎ๐Ÿ‡ณ By Gokul Nair </p>