LePips / SFIcons

Create customizable icons using SFSymbols or text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

banner

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.

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

About

Create customizable icons using SFSymbols or text

License:MIT License


Languages

Language:Swift 100.0%