Burst
🎆 Burst interface elements in Swift
Install / Use
/learn @piemonte/BurstREADME
Burst 🎆
Burst is a Swift and simple way to make elements in your iOS app burst.
Back in the day, Facebook Paper popularized a firework burst effect using CAEmitterLayers with buttons.
This library provides a firework effect using CAEmitterLayers contained in an easy-to-use customizable component, written in Swift.
If you enjoy this library, you may also like another CAEmitterLayer project, Twinkle.
Requirements
- iOS 16.0+
- Swift 5.9+
- Xcode 15.0+
Quick Start
Burst is available and recommended for installation using the Cocoa dependency manager CocoaPods. You can also simply copy the Burst.swift file into your Xcode project.
# CocoaPods
pod "Burst", "~> 0.1.2"
# SwiftPM
dependencies: [
.package(url: "https://github.com/piemonte/Burst", from: "0.1.2")
]
Usage
The sample project provides an example of how to integrate Burst, otherwise you can follow this example.
import Burst
// ...
let button: BurstButton = BurstButton(frame: CGRect(x: 0, y: 0, width: 100, height: 100))
// ...
extension ViewController {
@objc func handleButton(_ button: BurstButton) {
button.isSelected = !button.isSelected
}
}
Community
- Found a bug? Open an issue.
- Feature idea? Open an issue.
- Want to contribute? Submit a pull request.
Resources
- Core Animation Reference Collection
- Swift Evolution
- CAEmitterLayer – NSHipster
- MCFireworksButton, Objective-C version
- Twinkle
- Twinkle for Android
- Shimmer
License
Burst is available under the MIT license, see the LICENSE file for more information.
Related Skills
node-connect
341.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.4kCommit, push, and open a PR
