Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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: 9 days ago
JSON representation

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

Awesome Lists containing this project

README

        


BadgeIcon Logo


Version
Swift 6.0
Swift UI
MIT License
Twitter: @danielsaidi
Mastodon: @danielsaidi@mastodon.social

## About BadgeIcon

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

BadgeIcon comes with a bunch of predefined icons:


BadgeIcon Preview

You can also create your own 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 30+ predefined icon types, for instance `.alert`, `.bug`, `.heart`, etc.

You can use these badges as regular images, which will scale to fill the available space:

```swift
struct ContentView: View {

var body: some View {
BadgeIcon.calendar
}
}
```

You can also create your own badge icons, with custom icon and badge styling:

```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.

## 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 if you want to contribute in any way:

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

## 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
[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