Repository navigation
references/liquid-glass.md uses non-existent Glass.prominent — fails to compile #64
Description
Summary
references/liquid-glass.md (v3.1.0) repeatedly references Glass.prominent as a static property of the Glass material type. This property does not exist in the shipping SwiftUI / SwiftUICore SDKs on either macOS 26 or iOS 26, so any code an agent generates from these examples fails to compile with:
error: type 'Glass' has no member 'prominent'
Reproduction
Any of the snippets in the doc that use .prominent reproduce, e.g.:
Text("Hi")
.padding()
.glassEffect(.prominent) // ← compile error in macOS 26 / iOS 26 SDK.glassEffect(.prominent.tint(.red.opacity(0.3))) // ← compile errorEvidence (four independent sources, all agree)
1. macOS 26 SDK swiftinterface — SwiftUICore.framework/Modules/SwiftUICore.swiftmodule/arm64e-apple-macos.swiftinterface:
public struct Glass : Swift.Equatable, Swift.Sendable {
public static var regular: SwiftUICore.Glass { get }
public static var clear: SwiftUICore.Glass { get }
public static var identity: SwiftUICore.Glass { get }
public func tint(_ color: SwiftUICore.Color?) -> SwiftUICore.Glass
public func interactive(_ isEnabled: Swift.Bool = true) -> SwiftUICore.Glass
public static func == (a: SwiftUICore.Glass, b: SwiftUICore.Glass) -> Swift.Bool
}2. iOS 26 SDK swiftinterface — same framework, iOS variant — surfaces the identical API. No .prominent.
3. Compiler probe —
import SwiftUI
@available(macOS 26.0, *)
func probe() { let _: Glass = .prominent }xcrun -sdk macosx swiftc -typecheck -target arm64-apple-macos26.0 probe.swift →
error: type 'Glass' has no member 'prominent'
4. Apple's official documentation JSON — https://developer.apple.com/tutorials/data/documentation/swiftui/glass.json:
- Type Properties:
clear,identity,regular - Instance Methods:
interactive(_:),tint(_:)
Likely root cause
The skill conflates the Glass material with the GlassProminentButtonStyle (used as .buttonStyle(.glassProminent)). Those are real, shipping APIs — but they are a PrimitiveButtonStyle, not a Glass material. There is no "prominent" prominence level on the Glass material itself.
To make a glass surface appear more prominent in shipping macOS 26 / iOS 26, the idiomatic move is a stronger tint:
.glassEffect(.regular.tint(.accentColor.opacity(0.4)), in: .rect(cornerRadius: 16))…not a separate prominence enum value.
Affected sections of references/liquid-glass.md
- "Prominence Levels" — the entire
.regularvs.prominentdistinction is wrong; only.regular,.clear,.identityexist. - "Tinting" —
.glassEffect(.prominent.tint(.red.opacity(0.3)))should become.glassEffect(.regular.tint(.red.opacity(0.3))). - "Segmented Control" example —
.prominent.interactive()should become.regular.interactive().tint(.accentColor)(or similar) for the selected state. - Best-practices bullet that mentions "Appropriate prominence levels used" should be reworded around tint intensity.
The .buttonStyle(.glass) and .buttonStyle(.glassProminent) examples are correct and should stay.
Environment
- Xcode 26.2 (Build 17C52)
- macOS 26.3 host
- Both
MacOSX.sdkandiPhoneOS.sdkfrom Xcode 26.2 verified
Happy to send a PR if helpful — wanted to file the issue first so you can decide the framing you want for the rewrite.
Activity
EngOmarElsayed commentedon May 9, 2026
Thanks for catching this, if you want to open a PR with the fix do that if not I will fix it as soon as possible
kumamaki commentedon May 10, 2026
Sure. Here.
fix: replace non-existent Glass.prominent with correct API