BadgeIcon is a SwiftUI library that lets you create beautiful, scalable icons, using SF Symbols or custom assets:
BadgeIcon comes with 118 predefined icons, and lets you create custom icons with rich customization options.
Installation
BadgeIcon can be installed with the Swift Package Manager:
https://github.com/danielsaidi/BadgeIcon.git
Getting started
BadgeIcon has 118 predefined icons, like .alert, .bug, and .heart, which will scale to fill the available space:
struct ContentView: View { var body: some View { BadgeIcon.calendar BadgeIcon.heart.frame(width: 150) } }
You can also create your own badge icons, with a rich set of icon and badge style options:
extension BadgeIcon { public static let prominentError = Self( icon: MyCustomErrorIcon(), style: .init( badgeColor: .red ) ) }
You can use both Image values or custom views as the icon that is shown inside the badge.
Documentation
The online documentation has more information, articles, code examples, etc.
Demo Application
The Demo folder has a demo app that lets you explore the library.
Support My Work
You can become a sponsor to help me dedicate more time on my various open-source tools. Every contribution, no matter the size, makes a real difference in keeping these tools free and actively developed.
Contact
Feel free to reach out if you have questions or want to contribute in any way:
- Website: danielsaidi.com
- E-mail: daniel.saidi@gmail.com
- Bluesky: @danielsaidi@bsky.social
- Mastodon: @danielsaidi@mastodon.social
License
BadgeIcon is available under the MIT license. See the LICENSE file for more info.