{"id":15647614,"url":"https://github.com/simonbs/confettikit","last_synced_at":"2025-10-23T16:41:04.845Z","repository":{"id":252811552,"uuid":"477008944","full_name":"simonbs/ConfettiKit","owner":"simonbs","description":"🎊 A Swift package for shooting confetti.","archived":false,"fork":false,"pushed_at":"2024-08-18T03:06:08.000Z","size":2020,"stargazers_count":61,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-05T23:34:42.211Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonbs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"simonbs"}},"created_at":"2022-04-02T09:32:51.000Z","updated_at":"2025-06-30T02:35:27.000Z","dependencies_parsed_at":"2024-10-03T12:20:38.585Z","dependency_job_id":"2b7f8f14-111f-4beb-ac45-ece6ef20cb91","html_url":"https://github.com/simonbs/ConfettiKit","commit_stats":null,"previous_names":["simonbs/confettikit"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/simonbs/ConfettiKit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonbs%2FConfettiKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonbs%2FConfettiKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonbs%2FConfettiKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonbs%2FConfettiKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonbs","download_url":"https://codeload.github.com/simonbs/ConfettiKit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonbs%2FConfettiKit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266655367,"owners_count":23963553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T12:20:18.133Z","updated_at":"2025-10-23T16:41:04.787Z","avatar_url":"https://github.com/simonbs.png","language":"Swift","funding_links":["https://github.com/sponsors/simonbs"],"categories":[],"sub_categories":[],"readme":"# 🎊 ConfettiKit\n\nA Swift package for shooting confetti. The implementation is heavily inspired by the blog post [Recreating iMessage Confetti](https://bryce.co/recreating-imessage-confetti/) by [Bryce Bostwick](https://mastodon.bryce.co/@bryce).\n\n## 📦 Adding the Package\n\nConfettiKit is distributed using [Swift Package Manager](https://www.swift.org/documentation/package-manager/). Install ConfettiKit in a project by adding it as a dependency in your Package.swift manifest or through “Package Dependencies” in project settings.\n\n```swift\nlet package = Package(\n    dependencies: [\n        .package(url: \"git@github.com:simonbs/ConfettiKit.git\", from: \"1.0.0\")\n    ]\n)\n```\n\n## 🚀 Getting Started\n\nStart by creating an instance of ConfettiView and pass an array of UIImage's when doing so. Make sure to add the view to your view hierarchy.\n\n```swift\nfinal class ViewController: UIViewController {\n    private let confettiView: ConfettiView = {\n        let images: [UIImage] = [...]\n        let this = ConfettiView(images: images)\n        this.translatesAutoresizingMaskIntoConstraints = false\n        return this\n    }()\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        view.addSubview(confettiView)\n        NSLayoutConstraint.activate([\n            confettiView.leadingAnchor.constraint(equalTo: view.leadingAnchor),\n            confettiView.trailingAnchor.constraint(equalTo: view.trailingAnchor),\n            confettiView.topAnchor.constraint(equalTo: view.topAnchor),\n            confettiView.bottomAnchor.constraint(equalTo: view.bottomAnchor)\n        ])\n    }\n}\n```\n\nWhen you want to shoot confetti, for example in response to a user interaction, call the `shoot()` function on the confetti view.\n\n```swift\nconfettiView.shoot()\n```\n\nBy default, ConfettiView shoots confetti from the top to the bottom, creating the effect shown below.\n\n\u003cimg width=\"200\" src=\"confettiview-toptobottom.gif\" /\u003e\n\nYou may configure it to shoot confetti from the center to the left of the screen.\n\n```swift\nlet images: [UIImage] = [...]\nlet confettiView = ConfettiView(mode: .centerToLeft, images: images)\n```\n\nThis can be used to create the effect shown below.\n\n\u003cimg width=\"200\" src=\"confettiview-centertoleft.gif\" /\u003e\n\n## 👨‍💻 Contributing\n\nConfettiKit was specifically built to be used in my side projects, including [Runestone Text Editor](https://apps.apple.com/us/app/runestone-editor/id1548193893) and [Re: Toot](https://apps.apple.com/us/app/re-toot/id1661697436), so its API might be limited. However, pull requests with bug fixes and new features are much appreciated. I'll be happy to review and merge them once they're ready, as long as they align with the vision of ConfettiKit and offer generally useful functionality.\n\nClone the repository to get started working on the project.\n\n```bash\ngit clone git@github.com:simonbs/ConfettiKit.git\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonbs%2Fconfettikit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonbs%2Fconfettikit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonbs%2Fconfettikit/lists"}