Implement and Review SwiftUI Liquid Glass Features
A skill for correctly building or reviewing iOS 26+ SwiftUI Liquid Glass UI with proper modifier order, containers, and fallbacks.
Why it matters
Leverage the SwiftUI Liquid Glass API to build or review visually stunning and performant iOS UIs. Ensure correct native API usage, interactive elements, and adherence to Apple's design guidelines for a cohesive user experience.
Outcomes
What it gets done
Implement new UI features using native Liquid Glass APIs.
Review existing SwiftUI code for correct Liquid Glass implementation.
Refactor UI components to adopt Liquid Glass effects.
Ensure fallback handling for iOS versions prior to 26.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-swiftui-liquid-glass | bash Overview
SwiftUI Liquid Glass
A skill for correctly building or reviewing iOS 26+ SwiftUI Liquid Glass UI, covering modifier ordering, container grouping, interactivity scoping, and version-gated fallbacks. Use it specifically for iOS 26+ Liquid Glass adoption or review in SwiftUI; earlier iOS targets need the fallback material path instead.
What it does
This skill builds or reviews SwiftUI features that correctly align with the iOS 26+ Liquid Glass API, prioritizing native APIs (glassEffect, GlassEffectContainer, glass button styles) over custom blur implementations. It offers three workflow paths: reviewing an existing feature (checking where Liquid Glass should and shouldn't apply, verifying modifier order, shape usage, container placement, and iOS 26+ availability handling with sensible fallbacks), improving a feature (identifying target components for glass treatment, refactoring to use GlassEffectContainer when multiple glass elements coexist, adding .interactive() only for tappable/focusable elements), or implementing a new feature (designing glass surfaces and interactions first, adding glass modifiers after layout/appearance modifiers, adding morphing transitions only when the view hierarchy changes with animation). Core guidelines: prefer native Liquid Glass APIs over custom blurs, group coexisting glass elements in GlassEffectContainer, apply .glassEffect(...) after layout and visual modifiers (not before), reserve .interactive() for elements that actually respond to touch/pointer, keep shapes consistent across related elements, and always gate with #available(iOS 26, *) providing a non-glass fallback (e.g. .ultraThinMaterial) for earlier iOS versions. A review checklist verifies availability gating with fallback UI, multi-element composition wrapped in a container, correct modifier ordering, interactivity scoped to actual user interaction, glassEffectID with @Namespace used for morphing transitions, and visual consistency (shapes, tinting, spacing) across the feature. An implementation checklist walks through defining target elements and glass prominence, grouping elements in a spaced GlassEffectContainer, applying .glassEffect(.regular.tint(...).interactive(), in: .rect(cornerRadius:)), using .buttonStyle(.glass)/.glassProminent for actions, adding morphing transitions on hierarchy changes, and providing fallback materials for earlier iOS.
When to use - and when NOT to
Use it when adopting or reviewing Liquid Glass in SwiftUI UI, or when correct API usage, fallback handling, or modifier ordering for Liquid Glass is needed. It is scoped specifically to the iOS 26+ Liquid Glass API - any UI targeting only earlier iOS versions needs the fallback material path it describes, not Liquid Glass itself.
Inputs and outputs
Inputs: the SwiftUI view or feature to review or build, and whether the target deployment supports iOS 26+.
Outputs: SwiftUI code using correctly ordered glassEffect/GlassEffectContainer/glass button style modifiers with #available gating and a non-glass fallback for earlier iOS.
if #available(iOS 26, *) {
Text("Hello")
.padding()
.glassEffect(.regular.interactive(), in: .rect(cornerRadius: 16))
} else {
Text("Hello")
.padding()
.background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 16))
}
Who it's for
iOS/macOS developers adopting or reviewing Apple's iOS 26+ Liquid Glass design language in SwiftUI, who need correct modifier ordering, container usage, and version-gated fallbacks rather than ad hoc blur effects.
FAQ
Common questions
Discussion
Questions & comments ยท 0
Sign In Sign in to leave a comment.