dpearson2699/swift-ios-skills

swiftui-liquid-glass

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

77Collecting
See how to use itView GitHub source
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill "skills/swiftui-liquid-glass"
Automated source guide

Source checked Jul 28, 2026·Refresh due Oct 26, 2026

Reorganized from the pinned upstream SKILL.md

Turn swiftui-liquid-glass's source instructions into a guide you can follow

According to the pinned SKILL.md from dpearson2699/swift-ios-skills: 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…

npx skills add https://github.com/dpearson2699/swift-ios-skills --skill "skills/swiftui-liquid-glass"
Check the pinned source

Best fit

  • Use when asked about Liquid Glass, glass buttons, glassEffect, GlassEffectTransition, glassEffectID, glassEffectUnion, scroll edge effects, or adop
  • 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

Bring this context

  • A concrete task that matches the documented purpose of swiftui-liquid-glass.
  • The files, examples, or context the task depends on.
  • Your constraints, target environment, and definition of done.

Expected outputs

  • 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.

Key source sections

Read swiftui-liquid-glass through these 5 source sections

Sections are extracted automatically from the pinned SKILL.md and link back to the source.

01

Workflow

Choose the path that matches the request:

SKILL.md · Workflow
Identify target surfaces (floating controls, custom bars, transient controls).Decide shape, prominence, and whether each element is a real control or static status.Wrap grouped glass elements in a GlassEffectContainer.
02

3. Review existing Liquid Glass usage

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.

SKILL.md · 3. Review existing Liquid Glass usage
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 aft…
03

Review Checklist

[ ] Availability: if available(iOS 26, ) present with fallback UI.

SKILL.md · Review Checklist
[ ] Availability: if available(iOS 26, ) present with fallback UI.[ ] Container: Multiple glass views wrapped in GlassEffectContainer.[ ] Modifier order: .glassEffect() applied after layout/appearance modifiers.
04

1. Implement a new feature with Liquid Glass

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…

SKILL.md · 1. Implement a new feature with Liquid Glass
Identify target surfaces (floating controls, custom bars, transient controls).Decide shape, prominence, and whether each element is a real control or static status.Wrap grouped glass elements in a GlassEffectContainer.
05

2. Improve an existing feature with Liquid Glass

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…

SKILL.md · 2. Improve an existing feature with Liquid Glass
Find custom control or navigation backgrounds that can be replaced with .glassEffect().Wrap sibling glass elements in GlassEffectContainer for blending and performance.Replace custom glass-like buttons with .buttonStyle(.glass), .buttonStyle(.glassProminent), or configurable styles such as .buttonStyle(.glass(.clear)). Use .glass(:) when the button needs a specific tint or variant; re…

SkillSignal prompt templates

Provide the task, context, and acceptance criteria

These prompts were written by SkillSignal from the source structure; they are not upstream text.

Task-start prompt

Confirm source fit, inputs, and outputs before acting.

Use swiftui-liquid-glass to help me with: [specific task]. Context: [files, data, or background]. Constraints: [environment, scope, and prohibited actions]. Before acting, check the pinned SKILL.md and explain which sections apply, what inputs are still missing, and what you will deliver.

Source-guided execution

Make the Agent explicitly follow the key extracted sections.

Apply the pinned swiftui-liquid-glass source to [task]. Pay particular attention to these source sections: “Workflow”, “3. Review existing Liquid Glass usage”, “Review Checklist”, “1. Implement a new feature with Liquid Glass”, “2. Improve an existing feature with Liquid Glass”. Preserve the important decision at each step. Mark facts not covered by the source as “needs confirmation” instead of inventing them. Then verify the result against my acceptance criteria: [criteria].

Result-review prompt

Check omissions, permissions, and source drift before delivery.

Review the current swiftui-liquid-glass result: (1) does it satisfy the original task; (2) were any applicable steps or limits in the pinned SKILL.md missed; (3) did it perform any unauthorized file, command, network, or data action; and (4) which conclusions remain unverified? List issues first, then fix only what the source or user authorization supports.

Output checklist

Verify each item before delivery

The task matches the purpose documented in the SKILL.md.

The source section “Workflow” has been checked.

The source section “3. Review existing Liquid Glass usage” has been checked.

The source section “Review Checklist” has been checked.

The source section “1. Implement a new feature with Liquid Glass” has been checked.

Inputs, constraints, and acceptance criteria are explicit.

Unverified facts, compatibility, and outcome claims are clearly marked.

Any file, command, network, or data action has been reviewed.

Choose a different workflow

When another Skill is the better fit

FAQ

What does swiftui-liquid-glass do?

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…

How do I start using swiftui-liquid-glass?

The catalog detected this source-specific install command: npx skills add https://github.com/dpearson2699/swift-ios-skills --skill "skills/swiftui-liquid-glass". Inspect the command and pinned source before running it.

Which Agent platforms does it declare?

No dedicated Agent platform is declared in the pinned source record.

Repository stars
933
Repository forks
48
Quality
77/100
Source repository last pushed

Quality breakdown

Based on traceable docs and repository signals; stars are not treated as quality.

77/100
Documentation30/30
Specificity16/25
Maintenance18/20
Trust signals13/25

Compare before choosing

Related Agent Skills and source variants

These links are selected from shared tasks, functions, stacks, platforms, and same-name variants. Compare the source owner, documentation, permissions, and maintenance signals.

View original Skill.mdThis page is parsed directly from the repository SKILL.md without editorial rewriting. Collected: Jul 28, 2026 · about 5 min

SwiftUI Liquid Glass

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.

Contents

Workflow

Choose the path that matches the request:

1. Implement a new feature with Liquid Glass

  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 appearance modifiers.
  5. Add .interactive() only to tappable/focusable elements.
  6. Add morphing transitions with 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.
  7. Gate with if #available(iOS 26, *) and provide a fallback for earlier versions.

2. Improve an existing feature with Liquid Glass

  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 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.
  4. Add morphing transitions where animated insertion/removal occurs.

3. Review existing Liquid Glass usage

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.

Core API Summary

glassEffect(_:in:)

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

Glass struct

Property / MethodPurpose
.regularStandard glass material
.clearClear variant; add dimming/contrast treatment when legibility needs it
.identityNo visual effect (pass-through)
.tint(_:)Add a color tint for prominence
.interactive(_:)React to touch and pointer interactions

Chain them: .regular.tint(.blue).interactive()

GlassEffectContainer

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.

Morphing & Transitions

ModifierPurpose
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 Styles

Button("Action") { }
    .buttonStyle(.glass)           // standard glass button

Button("Primary") { }
    .buttonStyle(.glassProminent)  // prominent glass button

Button("Media") { }
    .buttonStyle(.glass(.clear))    // configurable variant; verify contrast

Related iOS 26 APIs

APIUse
scrollEdgeEffectStyleConfigure a scroll boundary's visual treatment.
backgroundExtensionEffectExtend one background under safe-area edges with mirrored blur.
ToolbarSpacerCreate a visual break between toolbar items.

See the corresponding sections in references/liquid-glass.md for signatures and examples.

Code Examples

Glass button with availability gate

if #available(iOS 26, *) {
    Button("Show Status") { showStatusDetails() }
        .buttonStyle(.glass)
} else {
    Button("Show Status") { showStatusDetails() }
        .buttonStyle(.bordered)
}

Grouped glass shapes in a container

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()
        }
    }
}

Nearby morphing transition

@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)
}

Unioning views into a single glass shape

@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)
        }
    }
}

Tinted glass icon control

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)))
    }
}

Clear glass action over bright content

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.

Static status count, not a toolbar control

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().

Common Mistakes

MistakeFix
Glass decorates static contentKeep it in the controls/navigation layer.
Read-only status uses .interactive() or an action slotPresent status as content, or make the whole badge one real accessible action.
Related effects use nested containersUse one GlassEffectContainer per related blending/morphing group.
.glassEffect() precedes padding/frame/styleApply layout and appearance first, then glass.
Custom effects assume default accessibility settingsTest Reduce Transparency, Reduce Motion, contrast, and legibility.
No pre-iOS 26 pathGate the effect and preserve a functional fallback.

Review Checklist

  • Availability: if #available(iOS 26, *) present with fallback UI.
  • Container: Multiple glass views wrapped in GlassEffectContainer.
  • Modifier order: .glassEffect() applied after layout/appearance modifiers.
  • Interactivity: .interactive() used only where user interaction exists.
  • Status vs action: Static counts/status are not toolbar controls and do not expose press/hover affordance.
  • Transitions: glassEffectID used with @Namespace for morphing animations.
  • Transition type: .matchedGeometry for nearby effects; .materialize for distant ones, applied to the conditional glass child.
  • Consistency: Shapes, tints, and spacing are uniform across related elements.
  • Performance: Glass effects are limited in number; container used for grouping.
  • Accessibility: Tested with Reduce Transparency and Reduce Motion enabled.
  • Button styles: Standard .glass, .glassProminent, or configurable .glass(_:) used for buttons; .glass(_:) is primary when a tint or clear variant is required.
  • Clear glass contrast: Clear glass over bright content has a dimming/contrast treatment or uses a more legible style.
  • Concurrency: IDs passed to glassEffectID / glassEffectUnion are Sendable; MainActor-annotated Liquid Glass APIs stay in SwiftUI UI code.

References

Skill path
skills/swiftui-liquid-glass/SKILL.md
Commit SHA
90c957327253
Repository license
NOASSERTION
Data collected