SFSymbolsPicker

1.1.0

A simple, highly customizable SwiftUI component for picking Apple's SF Symbols in iOS and macOS applications.
alessiorubicini/SFSymbolsPickerForSwiftUI

What's New

1.1.0

2026-06-26T07:47:41Z

v1.1.0 Release Notes

Features

  • Type-safe Binding<SFSymbol> and Binding<SFSymbol?> initializer overloads.
  • .symbolsPickerGrid() modifier to configure column count and spacing.
  • .symbolsPickerColors() modifier to customize picker color scheme.
  • Full VoiceOver accessibility labels for all symbols.

Optimizations

  • Refactored view state tracking to modern @Observable.
  • Migrated loader and event triggers to async/await.
  • Added unit test suite covering search filtering and paginated loads.
SFSymbolsPicker Logo

SF Symbols Picker for SwiftUI

A simple, highly customizable SwiftUI component for picking Apple's SF Symbols in iOS and macOS applications.

Swift 5.9+ iOS 17+ macOS 14+ License: MIT


Features

  • Cross-Platform Support: Built natively for both iOS and macOS applications.
  • Dynamic & Safe Loading: Integrates with SFSafeSymbols for type-safe compile-time checks and performance-optimized rendering.
  • Customizable UI:
    • Custom title and search placeholder text.
    • Optional custom close button views.
    • Interactive search bar with native behaviors.
  • Auto-Dismiss Option: Close the picker sheet automatically upon selecting a symbol.
  • Custom Symbol Subsets: Restrict the list to display only specific symbols.
  • Localization support: Fully supports custom string keys and localizations.

Preview

SF Symbols Picker Preview

Installation

Swift Package Manager (SPM)

  1. In Xcode, select File > Add Package Dependencies...
  2. Enter the repository URL: https://github.com/alessiorubicini/SFSymbolsPickerForSwiftUI
  3. Set the dependency rule to the desired version or branch.

Requirements

  • iOS: 17.0+
  • macOS: 14.0+
  • Xcode: 15.0+
  • Swift: 5.9+

Usage

1. Basic Usage

Present the SymbolsPicker in a sheet with a simple binding to a String variable.

import SwiftUI
import SFSymbolsPicker

struct BasicExampleView: View {
    @State private var selectedSymbol = "star.fill"
    @State private var isPickerPresented = false
    
    var body: some View {
        NavigationStack {
            VStack(spacing: 20) {
                Image(systemName: selectedSymbol)
                    .font(.largeTitle)
                
                Button("Select Symbol") {
                    isPickerPresented.toggle()
                }
            }
            .sheet(isPresented: $isPickerPresented) {
                SymbolsPicker(
                    selection: $selectedSymbol,
                    title: "Select a Symbol",
                    autoDismiss: true
                )
            }
        }
    }
}

2. Custom Symbol Subset

Limit the symbols available for selection by passing an array of SFSymbol objects from the SFSafeSymbols package. See CustomSymbolsExample.swift for a full example.

import SwiftUI
import SFSymbolsPicker
import SFSafeSymbols

struct CustomSubsetView: View {
    @State private var selectedSymbol = "figure.walk"
    @State private var isPickerPresented = false
    
    var body: some View {
        Button("Choose Movement Symbol") {
            isPickerPresented.toggle()
        }
        .sheet(isPresented: $isPickerPresented) {
            SymbolsPicker(
                selection: $selectedSymbol,
                title: "Movement Symbols",
                searchLabel: "Search...",
                autoDismiss: true,
                symbols: [
                    .figureWalk,
                    .figureWalkCircle,
                    .figureWalkCircleFill,
                    .figureWave,
                    .figureWaveCircle,
                    .figureWaveCircleFill
                ]
            )
        }
    }
}

3. Custom Close Button

Customize the appearance of the close button by providing a @ViewBuilder trailing closure.

SymbolsPicker(
    selection: $selectedSymbol,
    title: "Choose Symbol",
    autoDismiss: true
) {
    Image(systemName: "xmark.circle")
        .foregroundColor(.red)
}

For more examples, refer to:

License

This package is released under the MIT License. See LICENSE for more details.

Description

  • Swift Tools 5.9.0
View More Packages from this Author

Dependencies

Last updated: Sun Jun 28 2026 19:12:03 GMT-0900 (Hawaii-Aleutian Daylight Time)