https://github.com/onmyway133/FontAwesomeSwiftUI
Easy to use FontAwesome 5 in SwiftUI
https://github.com/onmyway133/FontAwesomeSwiftUI
List: FontAwesomeSwiftUI
Last synced: 16 days ago
JSON representation
Easy to use FontAwesome 5 in SwiftUI
- Host: GitHub
- URL: https://github.com/onmyway133/FontAwesomeSwiftUI
- Owner: onmyway133
- License: other
- Created: 2020-10-18T05:00:46.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-01-21T20:08:24.000Z (almost 2 years ago)
- Last Synced: 2025-11-11T07:02:08.162Z (27 days ago)
- Language: Swift
- Size: 526 KB
- Stars: 101
- Watchers: 2
- Forks: 12
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-swiftui - FontAwesomeSwiftUI - Easy to use FontAwesome 5 in SwiftUI (UI / Icon)
README
## FontAwesomeSwiftUI
## Description
Use FontAwesome 5 in your SwiftUI at ease.
- [x] FontAwesome 5 free versions
- [x] Type safe icon enums
- [x] Support 3 styles: regular, brand, solid
- [x] Support iOS, macOS, tvOS, watchOS
## Usage
For iOS, to register fonts programmatically instead of declaring in `Info.plist`, you can use below `register` method.
```swift
FontAwesome.register()
```
For macOS, you only need to declare fonts path, copy below to `Info.plist`
```xml
ATSApplicationFontsPath
.
```
To find which icon name is for which style, consult [fontawesome.com website](https://fontawesome.com/icons?s=brands)
```swift
Text(AwesomeIcon.aws.rawValue)
.font(.awesome(style: .brand, size: 20))
.foregroundColor(.white)
```
## Installation
**FontAwesomeSwiftUI** is available through [Swift Package Manager](https://swift.org/package-manager/).
Add FontAwesomeSwiftUI as a dependency to your Package.swift
```swift
.package(url: "https://github.com/onmyway133/FontAwesomeSwiftUI", from: "1.0.4")
```
**FontAwesomeSwiftUI** can also be installed manually. Just download and drop `Sources` folders in your project.
## Author
Khoa Pham, onmyway133@gmail.com
## Credit
- [thii](https://github.com/thii/FontAwesome.swift) for icon enums
## License
**FontAwesomeSwiftUI** is available under the MIT license. See the [LICENSE](https://github.com/onmyway133/FontAwesomeSwiftUI/blob/master/LICENSE.md) file for more info.