SwiftUI wrapper for Lucide icons. Drop in 1500+ icons into your apps.
Add it via Swift Package Manager:
dependencies: [
.package(url: "https://github.com/harispdev/lucide-swiftui.git", from: "1.0.0")
]Or in Xcode: File -> Add Packages and paste the repo URL.
Then use it:
import LucideSwiftUI
LucideIcon(name: "heart", size: 32, color: .red)That's it. Works with any Lucide icon.
You can tweak size, color, and stroke width:
LucideIcon(
name: "star",
size: 48,
color: .yellow,
strokeWidth: 3.0
)For common icons, there's a type-safe enum to avoid typos:
LucideIcon(icon: .heart, size: 32, color: .red)
LucideIcon(icon: .star, size: 32, color: .yellow)
LucideIcon(icon: .arrowDown, size: 32)The enum covers the most commonly used icons. For everything else, just use the string name, all the icons are available that way.
Here's a simple icon list:
HStack {
LucideIcon(name: "heart", size: 24, color: .red)
LucideIcon(name: "star", size: 24, color: .yellow)
LucideIcon(name: "bookmark", size: 24, color: .blue)
}Or use them in buttons:
Button(action: { /* do something */ }) {
LucideIcon(name: "download", size: 20, color: .blue)
}- iOS 14.0+ / macOS 11.0+ / tvOS 14.0+ / watchOS 7.0+
- Swift 5.5+
This library uses SVGView by Exyte for SVG rendering.
This library is provided free of charge for personal and commercial use, subject to the following conditions:
-
You may not repackage, wrap, modify, rebrand, sublicense, or otherwise redistribute this library, in whole or in part, in a manner that represents the library as your own original work or obscures the authorship.
-
You may not distribute derivative works whose primary purpose is to provide this library or any substantial portion of it under a different name or identity.
-
Use of this library within a larger application or service is permitted, provided that no claim of authorship over the library itself is made.
-
Attribution to the original author must be retained in all copies or substantial portions of the library.
By using this library, you agree to be bound by these terms.