Best for
- Use when asked about Liquid Glass, glass buttons, glassEffect, GlassEffectTransition, glassEffectID, glassEffectUnion, scroll edge effects, or adop
dpearson2699/swift-ios-skills/skills/swiftui-liquid-glass/SKILL.md
Implement, review, or improve SwiftUI Liquid Glass effects for iOS 26+. Covers glassEffect modifier, GlassEffectContainer, glass button styles, glass toolbar/tab bar, static status badges vs interactive controls, morphing transitions, tinting, interactive glass, ToolbarSpacer, scrollEdgeEffectStyle, backgroundExtensionEffect, and availability gating. Use when asked about Liquid Glass, glass buttons, glassEffect, GlassEffectTransition, glassEffectID, glassEffectUnion, scroll edge effects, or adop
Decision brief
Liquid Glass is the dynamic translucent material introduced across Apple platforms 26. Standard SwiftUI bars and presentations adopt it automatically when built with the current SDK. Reserve custom glass for functional controls and navigation surfaces, not general content backgr…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill "skills/swiftui-liquid-glass"Inspect the Agent Skill "swiftui-liquid-glass" from https://github.com/dpearson2699/swift-ios-skills/blob/90c9573272531337962fbb3505036d61ed23389a/skills/swiftui-liquid-glass/SKILL.md at commit 90c9573272531337962fbb3505036d61ed23389a. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Choose the path that matches the request:
Trace each effect through content/control ownership, layout order, container scope, interactivity, transitions, availability, accessibility settings, and fallback. Restore the same UI fixture and rerun the checklist after each correction.
[ ] Availability: if available(iOS 26, ) present with fallback UI.
1. Identify target surfaces (floating controls, custom bars, transient controls). 2. Decide shape, prominence, and whether each element is a real control or static status. 3. Wrap grouped glass elements in a GlassEffectContainer. 4. Apply .glassEffect() after layout and appearan…
1. Find custom control or navigation backgrounds that can be replaced with .glassEffect(). 2. Wrap sibling glass elements in GlassEffectContainer for blending and performance. 3. Replace custom glass-like buttons with .buttonStyle(.glass), .buttonStyle(.glassProminent), or confi…
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 77/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 933 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Liquid Glass is the dynamic translucent material introduced across Apple platforms 26. Standard SwiftUI bars and presentations adopt it automatically when built with the current SDK. Reserve custom glass for functional controls and navigation surfaces, not general content backgrounds.
See references/liquid-glass.md for the full API reference with additional examples.
Choose the path that matches the request:
GlassEffectContainer..glassEffect() after layout and appearance modifiers..interactive() only to tappable/focusable elements.glassEffectID(_:in:) where the view hierarchy
changes with animation. Put glassEffectTransition(_:) on the inserted or
removed glass child, not on the always-present container, and choose the style
using Morphing & Transitions.if #available(iOS 26, *) and provide a fallback for earlier versions..glassEffect().GlassEffectContainer for blending and performance..buttonStyle(.glass), .buttonStyle(.glassProminent), or configurable styles such as .buttonStyle(.glass(.clear)). Use .glass(_:) when the button needs a specific tint or variant; reserve .glassProminent for high-emphasis primary actions.Trace each effect through content/control ownership, layout order, container scope, interactivity, transitions, availability, accessibility settings, and fallback. Restore the same UI fixture and rerun the checklist after each correction.
Applies Liquid Glass behind a view. Default: .regular variant in a Capsule shape.
nonisolated func glassEffect(
_ glass: Glass = .regular,
in shape: some Shape = DefaultGlassEffectShape()
) -> some View
| Property / Method | Purpose |
|---|---|
.regular | Standard glass material |
.clear | Clear variant; add dimming/contrast treatment when legibility needs it |
.identity | No visual effect (pass-through) |
.tint(_:) | Add a color tint for prominence |
.interactive(_:) | React to touch and pointer interactions |
Chain them: .regular.tint(.blue).interactive()
Wraps multiple glass views for shared rendering, blending, and morphing.
GlassEffectContainer(spacing: 24) {
// child views with .glassEffect()
}
The spacing controls when nearby glass shapes begin to blend. Match or exceed
the interior layout spacing so shapes merge during animated transitions but remain
separate at rest.
| Modifier | Purpose |
|---|---|
glassEffectID(_:in:) | Stable identity for morphing during view hierarchy changes |
glassEffectUnion(id:namespace:) | Merge multiple views into one glass shape |
glassEffectTransition(_:) | Control how glass appears/disappears |
Transition decision: use .matchedGeometry for nearby effects inside the container's
spacing; use .materialize for distant insertion/removal or when no geometry match
should occur; use .identity only when no transition animation is wanted.
Button("Action") { }
.buttonStyle(.glass) // standard glass button
Button("Primary") { }
.buttonStyle(.glassProminent) // prominent glass button
Button("Media") { }
.buttonStyle(.glass(.clear)) // configurable variant; verify contrast
| API | Use |
|---|---|
scrollEdgeEffectStyle | Configure a scroll boundary's visual treatment. |
backgroundExtensionEffect | Extend one background under safe-area edges with mirrored blur. |
ToolbarSpacer | Create a visual break between toolbar items. |
See the corresponding sections in references/liquid-glass.md for signatures and examples.
if #available(iOS 26, *) {
Button("Show Status") { showStatusDetails() }
.buttonStyle(.glass)
} else {
Button("Show Status") { showStatusDetails() }
.buttonStyle(.bordered)
}
let symbols = ["pencil", "eraser.fill", "lasso"]
GlassEffectContainer(spacing: 24) {
HStack(spacing: 24) {
ForEach(symbols, id: \.self) { symbol in
Image(systemName: symbol)
.frame(width: 56, height: 56)
.glassEffect()
}
}
}
@State private var isExpanded = false
@Namespace private var ns
var body: some View {
GlassEffectContainer(spacing: 40) {
HStack(spacing: 40) {
Image(systemName: "pencil")
.frame(width: 80, height: 80)
.glassEffect()
.glassEffectID("pencil", in: ns)
if isExpanded {
Image(systemName: "eraser.fill")
.frame(width: 80, height: 80)
.glassEffect()
.glassEffectID("eraser", in: ns)
.glassEffectTransition(.matchedGeometry)
}
}
}
Button("Toggle") {
withAnimation { isExpanded.toggle() }
}
.buttonStyle(.glass)
}
@Namespace private var ns
GlassEffectContainer(spacing: 20) {
HStack(spacing: 20) {
ForEach(items.indices, id: \.self) { i in
Image(systemName: items[i])
.frame(width: 80, height: 80)
.glassEffect()
.glassEffectUnion(id: i < 2 ? "group1" : "group2", namespace: ns)
}
}
}
struct GlassIconControl: View {
let icon: String
let tint: Color
let action: () -> Void
var body: some View {
Button(action: action) {
Image(systemName: icon)
.font(.title2)
.padding()
}
.buttonStyle(.glass(.regular.tint(tint)))
}
}
if #available(iOS 26, *) {
ZStack {
Capsule()
.fill(.black.opacity(0.28))
Button {
playRecap()
} label: {
Label("Play", systemImage: "play.fill")
.font(.headline)
.padding(.horizontal, 8)
}
.buttonStyle(.glass(.clear))
}
.fixedSize()
} else {
Button("Play", systemImage: "play.fill") { playRecap() }
.buttonStyle(.borderedProminent)
}
Use clear glass only when the background still leaves labels and symbols readable. On bright or busy backgrounds, add a subtle dimming layer or choose a more opaque button style.
VStack(spacing: 8) {
Text("24")
.font(.headline.monospacedDigit())
.accessibilityLabel("24 options expiring")
Text("Options Expiring")
.font(.subheadline)
.foregroundStyle(.secondary)
}
// Keep read-only status out of toolbar control slots and do not add .interactive().
| Mistake | Fix |
|---|---|
| Glass decorates static content | Keep it in the controls/navigation layer. |
Read-only status uses .interactive() or an action slot | Present status as content, or make the whole badge one real accessible action. |
| Related effects use nested containers | Use one GlassEffectContainer per related blending/morphing group. |
.glassEffect() precedes padding/frame/style | Apply layout and appearance first, then glass. |
| Custom effects assume default accessibility settings | Test Reduce Transparency, Reduce Motion, contrast, and legibility. |
| No pre-iOS 26 path | Gate the effect and preserve a functional fallback. |
if #available(iOS 26, *) present with fallback UI.GlassEffectContainer..glassEffect() applied after layout/appearance modifiers..interactive() used only where user interaction exists.glassEffectID used with @Namespace for morphing animations..matchedGeometry for nearby effects; .materialize for distant ones, applied to the conditional glass child..glass, .glassProminent, or configurable .glass(_:) used for buttons; .glass(_:) is primary when a tint or clear variant is required.glassEffectID / glassEffectUnion are Sendable; MainActor-annotated Liquid Glass APIs stay in SwiftUI UI code.Alternatives
Jeffallan/claude-skills
Builds and debugs Shopify themes (.liquid files, theme.json, sections), develops custom Shopify apps (shopify.app.toml, OAuth, webhooks), and implements Storefront API integrations for headless storefronts. Use when building or customizing Shopify themes, creating Hydrogen or custom React storefronts, developing Shopify apps, implementing checkout UI extensions or Shopify Functions, optimizing performance, or integrating third-party services. Invoke for Liquid templating, Storefront API, app dev
event4u-app/agent-config
Use when the user says "review the design", "check the UI", or wants a comprehensive UI/UX review. Uses a 7-phase methodology covering interaction, responsiveness, accessibility, and more.
JasonColapietro/suede-creator-skills
Give a blunt A-F ship grade for a code change across correctness, security, data, UX, verification, and deploy readiness. Use for a grade, not a findings review.
event4u-app/agent-config
Use when designing APIs, planning endpoints, REST conventions, versioning, or deprecation — even when the user just says 'expose this as an endpoint' without naming API design.