Skip to content

UI icons docs

Swift

The icons as custom symbols in a Swift package. They size with text, follow Dynamic Type and take any colour, like SF Symbols.

DocsSwift

Add the package

In Xcode, choose File, Add Package Dependencies, and paste this URL:

Package URL
https://github.com/iconoven/iconoven-swift

Add the IconOven library to your app target. It needs iOS 15, macOS 12, watchOS 8, tvOS 15 or visionOS 1, or later.

SwiftUI

Names are the icon name in camel case: credit-card is .creditCard, the same as the React names. IconOvenIcon.allCases lists them all, for building a picker.

SwiftUI
import SwiftUI
import IconOven

Label("Wallet", iconoven: .wallet)
  .font(.title3)

Image(iconoven: .creditCard)

Size and colour

Icons size with the font around them, so .font(.body) next to body text lines up on the baseline and follows Dynamic Type. .font(.body.weight(.light)) through .weight(.black) sets the stroke weight. On iOS 16 and macOS 13 and later, .fontWeight(_:) works too. Use .imageScale to go a step larger or smaller, and .foregroundStyle for colour.

SwiftUI
Image(iconoven: .bell)
  .font(.title2.weight(.semibold))
  .foregroundStyle(.tint)

UIKit and AppKit

UIKit
import UIKit
import IconOven

let image = UIImage.iconoven(.wallet, with: .init(textStyle: .body))
button.setImage(image, for: .normal)

On macOS, use NSImage.iconoven(.lock).

Pro

Pro comes as a zip from your order page, IconOvenPro-<version>.zip. It holds a local Swift package called IconOvenPro with every icon, free and Pro.

Unzip it and move the IconOvenPro folder into your project, for example Packages/IconOvenPro. In Xcode, choose File, Add Package Dependencies, Add Local, and pick the folder. Or add it in Package.swift:

Package.swift
.package(path: "Packages/IconOvenPro")

// in your target's dependencies
.product(name: "IconOvenPro", package: "IconOvenPro")

Coming from the free package, remove iconoven-swift and change the import. The API is the same, so the rest of your code stays as it is. Don't link both packages in one target.

SwiftUI
import SwiftUI
import IconOvenPro

Image(iconoven: .creditCard)

Commit the folder with your project, so your builds and your teammates don't need a key. Keep that repository private: the Pro licence doesn't allow publishing the package. When we add icons, download the new zip from the same page and replace the folder.

Your cart

Your cart is empty.

Browse icons