Skip to content

A SwiftUI library that lets you create beautiful, scalable icons.

License

Notifications You must be signed in to change notification settings

benbacardi/BadgeIcon

 
 

Repository files navigation

Project Icon

Version Swift 6.0 Swift UI Documentation MIT License Sponsor my work

BadgeIcon

BadgeIcon is a SwiftUI library that lets you create beautiful, scalable icons, using SF Symbols or custom assets:

BadgeIcon Preview

BadgeIcon comes with 50 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

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.

Getting started

BadgeIcon has 50 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.

Contact

Feel free to reach out if you have questions or want to contribute in any way:

License

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

About

A SwiftUI library that lets you create beautiful, scalable icons.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 54.0%
  • Swift 46.0%