qiyangdev/sfsymbolpicker
A beautiful and intuitive SwiftUI component for picking SF Symbols in your iOS and macOS apps.
Features
- π¨ Beautiful grid-based symbol picker interface
- π Categorized symbol browsing
- π± Support for iOS and macOS
- π Easy integration with SwiftUI
- π― Built with SwiftUI and native system components
Requirements
- iOS 17.0+
- macOS 14.0+
- Swift 6.1+
Installation
Swift Package Manager
Add the package to your project using Swift Package Manager:
dependencies: [
.package(url: "https://github.com/wangqiyangx/SFSymbolPicker.git", from: "1.0.2")
]Usage
Basic Usage
import SwiftUI
import SFSymbolPicker
struct ContentView: View {
@State private var selectedSymbol = "book"
var body: some View {
Form {
SFSymbolPicker("Event icon", selection: $selectedSymbol)
}
}
}Customization
The picker can be customized through various parameters:
SFSymbolPicker(
"Custom Title", // The title displayed above the picker
selection: $selectedSymbol // Binding to the selected symbol
)License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Acknowledgments
- Apple for creating SF Symbols 6
- The SwiftUI team for making this possible
Package Metadata
Repository: qiyangdev/sfsymbolpicker
Default branch: main
README: README.md