https://github.com/lepips/sficons
Create customizable icons using SFSymbols or text
https://github.com/lepips/sficons
Last synced: 9 months ago
JSON representation
Create customizable icons using SFSymbols or text
- Host: GitHub
- URL: https://github.com/lepips/sficons
- Owner: LePips
- License: mit
- Created: 2023-07-18T20:46:17.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-19T06:07:34.000Z (almost 3 years ago)
- Last Synced: 2025-02-14T03:59:02.063Z (over 1 year ago)
- Language: Swift
- Homepage:
- Size: 38.1 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# SFIcons
Generate simple icons using SFSymbols, emojis, or text. Just like Contacts and Reminders!
## Usage
Simply create an `SFIcon` and use within an `SFIconview`. Modifiers still apply to the underlying SFSymbol `Image` and `Text` for further native customization.
```swift
let sfIcon: SFIcon = SFIcon(
icon: .sfSymbol(systemName: "list.bullet"),
iconStyle: .color(.white),
shape: .circle,
shapeStyle: .color(.red)
)
// ... in `View`
var body: some View {
SFIconView(sfIcon: sfIcon)
.fontWeight(.heavy) // The SFSymbol font will be heavy
}
```
### Customization
An icon can be a defined SFSymbol `systemName` or `String`, about 2 uppercased characters can fit comfortably.
| `.sfSymbol("figure.run")` | `.string("😂")` | `.string("SJ")` |
| ------------- | ------------- | ------------- |
|
|
|
|
## Example
A sample project is provided for iOS, tvOS, and macOS. tvOS and macOS will generate a random icon and iOS has a customizable view that replicates the list creation from Reminders with emoji and text icon input.