SP GlassKit1.1.0

GlassThinkingIndicator

Explicit activity indicator with a reduced-motion form; it never shows presumed reasoning.

  • Content
  • iOS 26 · iPadOS 26 · macOS 26
  • Version 1.1.0
  • glass-thinking-indicator

Content on an opaque, readable surface. Glass is kept for controls.

GlassThinkingIndicator running in SP Glass Studio.Capture
Capture of the component running in SP Glass Studio on the iOS 26.5 simulator. Liquid Glass is rendered by the system; this is an image, not a live preview.

Installation

spglass add glass-thinking-indicator

Copies the sources and their dependencies into your project. Set up the CLI.

Swift
.package(url: "https://git.spboucher.ai/sp-glasskit.git", from: "1.1.0")

import SPGlassKit
Identifierglass-thinking-indicator
ModuleSPGlassAI
Kindcontent-component — a chip on an opaque surface (symbol tile, text, activity dots), or a symbol and a text alone
PlatformsiOS 26, iPadOS 26, macOS 26
ExampleExamples/Gallery/AI/GlassThinkingIndicatorExample.swift

UI only. The indicator states an activity in the host's words. It never displays reasoning, intermediate thoughts or any text the host did not pass as label.

Minimal usage

Swift
GlassThinkingIndicator(.searching, label: "Searching the documentation")

Variants

KindSymbol
.thinkingsparkles
.searchingmagnifyingglass
.readingdoc.text.magnifyingglass
.writingpencil.line
.waitinghourglass
.custom(systemImage:)Any SF Symbol

The kind only selects the symbol. The words always come from label; without a label the indicator reads "Working".

StyleUse
.chip (default)A capsule on an opaque themed surface: tinted symbol tile, the label, three activity dots. Stands in a conversation for the reply that is coming.
.plainThe symbol and the label in secondary text, for a status line or a toolbar.

Parameters

ParameterTypeDefaultMeaning
kindGlassActivityKind.thinkingSelects the symbol.
labelString?nil → "Working"What is happening, written by the host.
announcesChangesBooltruePosts a low-priority accessibility announcement when the label changes.
styleGlassThinkingIndicatorStyle.chip.chip or .plain.

States

The indicator is either on screen (activity in progress) or not: remove it when the activity ends. With Reduce Motion the symbol is static.

Advanced example

Swift
if let activity = agent.currentActivity {          // host type: { kind, label }
    GlassThinkingIndicator(activity.kind, label: activity.label)
        .transition(.opacity)
}

Accessibility

  • Symbol and text form one element with the "updates frequently" trait; the symbol is decorative.
  • A change of label is announced with AccessibilityNotification.Announcement at low priority, so it never interrupts speech in progress. Blank and unchanged labels are not announced.
  • The pulse is a symbol effect that is disabled with Reduce Motion (real or simulated).

Limits

  • The symbol pulses for as long as the view is on screen: showing it while nothing happens would be an idle animation. Tie its presence to real activity.
  • There is no elapsed time, progress value or step list; use GlassAgentPanel or GlassProgress for those.
  • Announcements were compiled but not heard with VoiceOver during verification; the rule deciding when to announce is unit-tested.

Example

Complete example (compiled with the package)
import SwiftUI
import SPGlassKit

public struct GlassThinkingIndicatorExample: GlassExample {
    public static let componentID = "glass-thinking-indicator"

    /// Fictitious activity labels, written by the host — never text coming from a model.
    private let stages: [(kind: GlassActivityKind, label: String)] = [
        (.thinking, "Preparing the sample answer"),
        (.searching, "Searching the sample library"),
        (.reading, "Reading 3 sample documents"),
        (.writing, "Writing the summary"),
        (.waiting, "Waiting for your confirmation"),
    ]
    @State private var stage = 0

    public init() {}

    public var body: some View {
        VStack(alignment: .leading, spacing: 16) {
            Text("Sample data · simulated activity")
                .font(.caption)
                .foregroundStyle(.secondary)

            GlassThinkingIndicator(stages[stage].kind, label: stages[stage].label)
            GlassButton("Next activity", systemImage: "forward.end") {
                stage = (stage + 1) % stages.count
            }

            Divider()
            ForEach(stages.indices, id: \.self) { index in
                GlassThinkingIndicator(stages[index].kind, label: stages[index].label, announcesChanges: false)
            }
            GlassThinkingIndicator(.custom(systemImage: "arrow.down.circle"), label: "Downloading the sample model, which has a long label that wraps on narrow screens", announcesChanges: false)
            GlassThinkingIndicator(announcesChanges: false)
            GlassThinkingIndicator(.waiting, label: "Plain style, for a status line", announcesChanges: false, style: .plain)

            Divider()
            Text("Reduce Motion (simulated): static symbol")
                .font(.caption)
            GlassThinkingIndicator(.searching, label: "Searching the sample library", announcesChanges: false)
                .glassSimulatedAccessibility(reduceMotion: true)
        }
        .padding()
    }
}

#Preview("GlassThinkingIndicator") { GlassThinkingIndicatorExample().glassTheme(.crystal) }

Registry entry

Identifierglass-thinking-indicator
Version1.1.0
Depends onglass-foundation
FrameworksSwiftUI
Public symbolsGlassActivityKind, GlassActivityAnnouncement, GlassThinkingIndicatorStyle, GlassThinkingIndicator
LicenceMIT
Manifestmanifest.json

Files