Ecosyste.ms: Awesome
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: 9 days ago
JSON representation
BadgeIcon is a Swift SDK that helps you mimic System Settings icons in SwiftUI.
- Host: GitHub
- URL: https://github.com/danielsaidi/badgeicon
- Owner: danielsaidi
- License: mit
- Created: 2023-12-15T09:09:36.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-10-04T12:57:58.000Z (about 1 month ago)
- Last Synced: 2024-10-19T19:23:06.446Z (17 days ago)
- Topics: ios, macos, swift, swiftui, tvos, visionos, watchos
- Language: Swift
- Homepage:
- Size: 604 KB
- Stars: 82
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
## About BadgeIcon
BadgeIcon is a SwiftUI SDK that helps you mimic native System Settings icons.
BadgeIcon comes with a bunch of predefined icons:
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