Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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")` |
| ------------- | ------------- | ------------- |
| 29DE0B2C-2FBE-494A-8ECD-E78F8A1E16D8 | 0AC4AB47-0865-4DA6-A9A7-FCB9D2289476 | 88512527-A41A-4F0F-83C5-F7FD902647D0 |

## 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.

iOS example