Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lepips/sficons
Create customizable icons using SFSymbols or text
https://github.com/lepips/sficons
Last synced: 3 days 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 (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-19T06:07:34.000Z (over 1 year ago)
- Last Synced: 2023-07-19T07:37:50.313Z (over 1 year ago)
- Language: Swift
- Homepage:
- Size: 38.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![banner](https://github.com/LePips/SFIcons/assets/20747774/0416bc57-292f-4c35-9438-7fdcfb098e7a)
# 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.