Skip to content

vvisionnn/swift-fluent-icon

Repository files navigation

Swift Fluent Icon

Build Release Test Format

Warning

swift-fluent-icon is currently work in progress

Important

highly inspired by Font Awesome and LiveUI/Awesome

A awesome swift library for packaging fluent icon into you app without any costs, no need to delete unused resources just use like SF Symbol but type safe, with nearly no build time increase compare to the original method provided by fluent icon team

Installation

You can add FluentIcon to an Xcode project by adding it to your project as a package.

https://github.com/vvisionnn/swift-fluent-icon

If you want to use FluentIcon in a SwiftPM project, it's as simple as adding it to your Package.swift:

dependencies: [
  .package(url: "https://github.com/vvisionnn/swift-fluent-icon", from: "<any-version-released>")
]

And then adding the product to any target that needs access to the library:

.product(name: "FluentIcon", package: "swift-fluent-icon"),

Quick Start

// SwiftUI usage
FluentIcon.Filled.sparkle48.image
  .size(<size-you-want>)

// UIKit/AppKit Usage
UIImageView(image: FluentIcon.Filled.sparkle48.asImage())
NSImageView(image: FluentIcon.Filled.sparkle48.asImage())

More Examples

Please check Example folder or clone then open the FluentIcon.xcworkspace

Alternatives

There are many other icon libraries in the Swift community. Here are a few well-known examples:

License

This library is released under the MIT license. See LICENSE for details.