An open API service indexing awesome lists of open source software.

https://github.com/danielsaidi/badgeicon

BadgeIcon is a Swift SDK that helps you mimic System Settings icons in SwiftUI.
https://github.com/danielsaidi/badgeicon

ios macos swift swiftui tvos visionos watchos

Last synced: 3 months ago
JSON representation

BadgeIcon is a Swift SDK that helps you mimic System Settings icons in SwiftUI.

Awesome Lists containing this project

README

        


Project Icon


Version
Swift 6.0
Swift UI
Documentation
MIT License

# BadgeIcon

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


BadgeIcon Preview

BadgeIcon comes with 49 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 49 predefined icons, like `.alert`, `.bug`, and `.heart`, which will scale to fill the available space:

```swift
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:

```swift
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][Documentation] has more information, articles, code examples, etc.

## Support my work

You can [sponsor me][Sponsors] on GitHub Sponsors or [reach out][Email] for paid support, to help support my [open-source projects][OpenSource].

Your support makes it possible for me to put more work into these projects and make them the best they can be.

## Contact

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

* Website: [danielsaidi.com][Website]
* E-mail: [[email protected]][Email]
* Bluesky: [@[email protected]][Bluesky]
* Mastodon: [@[email protected]][Mastodon]

## License

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

[Email]: mailto:[email protected]
[Website]: https://www.danielsaidi.com
[GitHub]: https://www.github.com/danielsaidi
[Bluesky]: https://bsky.app/profile/danielsaidi.bsky.social
[Twitter]: https://www.twitter.com/danielsaidi
[Mastodon]: https://mastodon.social/@danielsaidi
[Sponsors]: https://github.com/sponsors/danielsaidi
[OpenSource]: https://www.danielsaidi.com/opensource

[Documentation]: https://danielsaidi.github.io/BadgeIcon/
[Getting-Started]: https://danielsaidi.github.io/BadgeIcon/documentation/badgeicon/getting-started
[License]: https://github.com/danielsaidi/BadgeIcon/blob/master/LICENSE