SkillAgentSearch 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,…

Install / Use

npx skills add dpearson2699/swift-ios-skills --skill swiftui-liquid-glass

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

87/100

Supported Platforms

Universal

Our assessment of swiftui-liquid-glass

swiftui-liquid-glass scores 87/100 on our quality scale, 2208th of 4,700 Development & Engineering skills we index (top 47%).

Its SKILL.md is 11 KB long, well organised into 24 sections with 10 code examples: a thorough specification that gives an agent plenty to work with.

With 1,143 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
29/30
Structure
20/20
Description
15/15
Adoption
13/20
Freshness
11/15

Maintenance, license and trust

  • The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
  • Our last check on 2026-11-02 found the source still online.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 86/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-10-04. Automated pattern scan on 2026-10-04. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

swiftui-liquid-glass compared with similar skills

All 4 of these similar skills score higher than swiftui-liquid-glass; compare them before choosing.

SkillScoreStarsUpdatedFormat
swiftui-liquid-glass (this skill)by dpearson2699871.1k4mo agoSKILL.md
taste-skillby Leonxlnx100116.8k8d agoCLAUDE.md
ai-job-searchby ai-job-search-dev10072.1ktodayCLAUDE.md
claude-howtoby luongnv8910047.3k2d agoCLAUDE.md
Claude-Code-Game-Studiosby Donchitos10039.7k7d agoCLAUDE.md

Frequently asked questions

How do I install swiftui-liquid-glass?
Run npx skills add dpearson2699/swift-ios-skills --skill swiftui-liquid-glass. The install tabs above show the steps for each supported agent.
Which AI agents does swiftui-liquid-glass work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is swiftui-liquid-glass safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 86/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is swiftui-liquid-glass still maintained?
The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.

name: swiftui-liquid-glass description: "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 adopting iOS 26 design."

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

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

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

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

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

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

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

Related Skills

View on GitHub
GitHub Stars1.1k
CategoryDevelopment
Updated3mo ago
Forks58

Languages

Python

Trust signals

86/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 medium1 info
swiftui-liquid-glass — Universal Skill: Install & Safety Check | SkillAgent