https://github.com/keitaoouchi/ioniconskit
Use Ionicons in your Swift projects.
https://github.com/keitaoouchi/ioniconskit
carthage cocoapods ionicons ios-swift ios-ui swift uifont uiimage
Last synced: 28 days ago
JSON representation
Use Ionicons in your Swift projects.
- Host: GitHub
- URL: https://github.com/keitaoouchi/ioniconskit
- Owner: keitaoouchi
- License: mit
- Created: 2016-09-17T06:07:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-07-22T00:58:14.000Z (over 3 years ago)
- Last Synced: 2025-03-31T07:08:25.948Z (12 months ago)
- Topics: carthage, cocoapods, ionicons, ios-swift, ios-ui, swift, uifont, uiimage
- Language: Swift
- Homepage: http://cocoadocs.org/docsets/IoniconsKit/
- Size: 313 KB
- Stars: 311
- Watchers: 7
- Forks: 23
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IoniconsKit
[](https://swift.org/)
[](http://cocoapods.org/pods/IoniconsKit)
[](http://cocoapods.org/pods/IoniconsKit)
[](http://cocoapods.org/pods/IoniconsKit)
[](https://swift.org/package-manager/)
> Ionicons v4 (696 icons) for UIKit and SwiftUI with type-safe Swift enums.


## Usage
### SwiftUI
```swift
import IoniconsKit
import SwiftUI
// Standalone icon view
IoniconView(.iosHome)
IoniconView(.mdSettings, color: .blue, size: 32)
// As a SwiftUI Image
Image.ionicon(with: .iosCamera, color: .systemOrange, size: 24)
// Label modifier
Text("Settings")
.ioniconLabel(.mdSettings, color: .gray, size: 18)
```
### UIKit
```swift
import IoniconsKit
// As UIFont in a UILabel
someLabel.font = UIFont.ionicon(of: 18)
someLabel.text = String.ionicon(with: .iosHome)
// As UIImage
someImageView.image = UIImage.ionicon(
with: .mdCamera,
textColor: .systemOrange,
size: CGSize(width: 24, height: 24)
)
```
### Icon Names
Ionicons v4 icons use `ios` and `md` prefixes:
- `.iosHome`, `.iosSettings`, `.iosCamera` — iOS-style icons
- `.mdHome`, `.mdSettings`, `.mdCamera` — Material Design-style icons
For the full icon list, see [Ionicons v4](https://ionic.io/ionicons/v4) or browse
[`Ionicons.swift`](IoniconsKit/Classes/Ionicons.swift).
## Requirements
| Target | Version |
|---------|---------|
| iOS | >= 18.0 |
| macOS | >= 26.0 |
| tvOS | >= 18.0 |
| watchOS | >= 11.0 |
| Swift | >= 6.0 |
## Installation
### Swift Package Manager
```swift
// Package.swift
.package(url: "https://github.com/keitaoouchi/IoniconsKit.git", from: "2.0.0")
```
Or add via Xcode: **File → Add Packages…** and enter the repository URL.
### CocoaPods
```ruby
pod 'IoniconsKit', '~> 2.0'
```
## Migration from v1.x
Version 2.0 updates to Ionicons v4, which renames all icons to use `ios` and `md` prefixes:
| v1.x | v2.x |
|------|------|
| `.home` | `.iosHome` / `.mdHome` |
| `.settings` | `.iosSettings` / `.mdSettings` |
| `.socialTwitter` | `.logoTwitter` |
SwiftUI support and Swift Package Manager support are also new in v2.0.
## License
[ionicons.ttf](https://ionic.io/ionicons) is licensed under the
[MIT License](https://github.com/ionic-team/ionicons/blob/main/LICENSE).
IoniconsKit is available under the MIT license. See the LICENSE file for more info.