Swiftui Liquid Glass logo

Swiftui Liquid Glass

Community
FloWritesCode
swiftui-liquid-glass

Implement, review, and refactor SwiftUI features using the iOS 26+ Liquid Glass API. Use when adopting Liquid Glass in new UI, converting existing surfaces to glass, reviewing glass usage for correctness, or fixing common Liquid Glass pitfalls (custom blur stacks, scroll views, button shapes, bottom bars, pre-enclosed symbols).

Overview

PublisherFloWritesCode
Repositoryfwc-swiftui-skills
Skill nameswiftui-liquid-glass
Stars
432
Forks
22
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by FloWritesCode on GitHub. Read the source before you install it.

Installation

Install the Swiftui Liquid Glass AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/FloWritesCode/fwc-swiftui-skills/tree/main/.agents/skills/swiftui-liquid-glass
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/FloWritesCode/fwc-swiftui-skills.git /tmp/fwc-swiftui-skills
mkdir -p .claude/skills
cp -r /tmp/fwc-swiftui-skills/.agents/skills/swiftui-liquid-glass .claude/skills/swiftui-liquid-glass
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Swiftui Liquid Glass in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Swiftui Liquid Glass on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Swiftui Liquid Glass is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

SwiftUI Liquid Glass

Use native Liquid Glass APIs on iOS 26+. Do not recreate the effect with materials, blurs, or shadows.

Core rules

  1. Don't build custom Liquid Glass through adding backgrounds, outlines, blurs and shadows.
  2. Buttons — style: use .buttonStyle(.glass) for non-colored buttons, and .buttonStyle(.glassProminent) for tinted buttons. .glassProminent supports .tint(), but this can only be a color (not a gradient).
  3. Buttons — shape: use .buttonBorderShape() instead of applying a shape to the button label by hand.
  4. Buttons — padding: using this button setup adds roughly 13pt of padding inside the liquid glass shape; keep this in mind when adapting designs.
  5. Custom views: use .glassEffect(.regular, in: ...) to embed custom Views inside liquid glass containers.
  6. Grouped glass: use GlassEffectContainer when multiple liquid glass elements are next to each other. this View / Container adds a liquid merge effect when the elements grow / touch each other.
  7. Scrolling: avoid using liquid glass inside ScrollView and List (anything that scrolls).
  8. Bottom bars: when anchoring a liquid glass View to the bottom of the screen, prefer embedding it in .safeAreaBar(.bottom) instead of a VStack or .overlay(). safeAreaBar adds a subtle blur effect behind its content.
  9. Toolbar items — no glass: on iOS 26+, navigation bar and window toolbar items get a shared Liquid Glass background by default. For items that should not show the glass capsule (plain icons, custom labels, status text, logos), apply .sharedBackgroundVisibility(.hidden) on the ToolbarItem, not on the inner view.
  10. SF Symbols — no pre-enclosed symbols: do not use pre-enclosed SF Symbol variants (such as plus.circle, xmark.circle.fill, or trash.circle) inside Liquid Glass buttons or containers. The glass shape already acts as the container; pre-enclosed symbols create an awkward "double enclosure" (a circle inside a circle). Use base/unenclosed symbols (plus, xmark, trash) and let .buttonBorderShape() or the glass container define the enclosing shape.

Decision tree

Need a button?
├─ Neutral / secondary → .buttonStyle(.glass)
└─ Tinted / primary    → .buttonStyle(.glassProminent).tint(someColor)

Icon in a glass button / surface?
└─ Plain unenclosed symbol (e.g. "plus", not "plus.circle") — glass provides enclosure

Need a custom non-button surface (chip, badge, card)?
└─ .glassEffect(.regular, in: shape) on the view content

Multiple glass elements nearby?
└─ Wrap in GlassEffectContainer(spacing: ...) { ... }

Fixed bottom toolbar / action bar?
└─ .safeAreaBar(.bottom) { ... }  — not VStack + overlay

Toolbar item without glass background?
└─ ToolbarItem { ... }.sharedBackgroundVisibility(.hidden)

Inside ScrollView, List, or Form rows?
└─ Do not use Liquid Glass — use solid/material fallback

Workflow

1) Review existing UI

  • Flag custom blur/material stacks masquerading as glass.
  • Check buttons use .glass / .glassProminent, not hand-built capsules.
  • Confirm .buttonBorderShape() is used instead of clipping the label.
  • Verify grouped elements sit in GlassEffectContainer.
  • Flag glass inside scrollable containers.
  • Check bottom-anchored bars use .safeAreaBar(.bottom).
  • Check toolbar items that should appear without glass use .sharedBackgroundVisibility(.hidden) on the ToolbarItem.
  • Flag pre-enclosed SF Symbols (e.g. circle/square variants) inside glass buttons or surfaces.
  • Gate with #available(iOS 26, *) and provide fallbacks.

2) Implement or refactor

  1. Pick the right primitive (button style vs glassEffect vs safeAreaBar).
  2. Apply layout and typography first; add glass modifiers last.
  3. Wrap adjacent glass elements in GlassEffectContainer.
  4. Account for ~13pt internal button padding when matching designs.
  5. Use unenclosed SF Symbols so the glass shape provides the enclosing geometry.
  6. Add iOS 26 availability checks and pre-26 fallbacks.

Patterns

Glass buttons

swift
// Secondary / neutral
Button("Cancel") { dismiss() }
    .buttonStyle(.glass)
    .buttonBorderShape(.capsule)

// Primary / tinted — color only, not gradient
Button("Save") { save() }
    .buttonStyle(.glassProminent)
    .tint(.blue)
    .buttonBorderShape(.roundedRectangle(radius: 12))

Do not clip the label yourself:

swift
// ❌ Wrong — shape on label, not the glass button
Button { action() } label: {
    Text("Save")
        .padding()
        .background(.ultraThinMaterial, in: Capsule())
}

// ✅ Right — native glass handles shape and padding
Button("Save") { action() }
    .buttonStyle(.glassProminent)
    .buttonBorderShape(.capsule)

Do not use pre-enclosed SF Symbols inside glass buttons:

swift
// ❌ Wrong — pre-enclosed symbol creates redundant double enclosure
Button { add() } label: {
    Image(systemName: "plus.circle.fill")
}
.buttonStyle(.glass)
.buttonBorderShape(.circle)

// ✅ Right — plain symbol, glass shape provides the enclosure
Button { add() } label: {
    Image(systemName: "plus")
}
.buttonStyle(.glass)
.buttonBorderShape(.circle)

Custom glass surfaces

swift
Label("3 items", systemImage: "tray")
    .padding(.horizontal, 16)
    .padding(.vertical, 10)
    .glassEffect(.regular, in: .capsule)

Add .interactive() when the surface responds to touch:

swift
Text("Tap me")
    .padding()
    .glassEffect(.regular.interactive(), in: .rect(cornerRadius: 16))

Grouped glass (merge effect)

swift
GlassEffectContainer(spacing: 24) {
    HStack(spacing: 24) {
        ToolButton(icon: "pencil")
        ToolButton(icon: "eraser")
        ToolButton(icon: "lasso")
    }
}

private struct ToolButton: View {
    let icon: String
    var body: some View {
        Image(systemName: icon)
            .frame(width: 56, height: 56)
            .font(.title2)
            .glassEffect(.regular, in: .circle)
    }
}

Tune spacing to control how close elements must be before the liquid merge kicks in.

Bottom action bar

swift
ContentView()
    .safeAreaBar(.bottom) {
        HStack {
            Button("Share") { share() }
                .buttonStyle(.glass)
            Button("Done") { done() }
                .buttonStyle(.glassProminent)
        }
    }

Prefer this over pinning with VStack { Spacer(); ... } or .overlay(alignment: .bottom).

Toolbar items without glass

On iOS 26+, toolbar items in the same logical grouping share a Liquid Glass background. Hide it when the item should look bare:

swift
.toolbar {
    ToolbarItem(placement: .principal) {
        Text("Draft")
            .font(.headline)
    }
    .sharedBackgroundVisibility(.hidden)

    ToolbarItem(placement: .topBarTrailing) {
        Button { add() } label: {
            Image(systemName: "plus")
        }
    }
    .sharedBackgroundVisibility(.hidden)

    ToolbarItem(placement: .topBarTrailing) {
        Button("Save") { save() }
            .buttonStyle(.glassProminent)
    }
}

Apply .sharedBackgroundVisibility(.hidden) on the ToolbarItem, not on the Button or label inside. Hiding the effect places the item in its own grouping, which can change spacing relative to glass-backed neighbors.

Do not put the modifier on the inner view:

swift
// ❌ Wrong — modifier on Button, glass background remains
ToolbarItem(placement: .topBarTrailing) {
    Button { add() } label: {
        Image(systemName: "plus")
    }
    .sharedBackgroundVisibility(.hidden)
}

// ✅ Right — modifier on ToolbarItem
ToolbarItem(placement: .topBarTrailing) {
    Button { add() } label: {
        Image(systemName: "plus")
    }
}
.sharedBackgroundVisibility(.hidden)

Availability fallback

swift
if #available(iOS 26, *) {
    content.glassEffect(.regular, in: .rect(cornerRadius: 16))
} else {
    content.background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 16))
}

Anti-patterns

Anti-patternWhy it failsDo instead
.background(.ultraThinMaterial) + blur + stroke + shadowNot Liquid Glass; wrong optics and no merge/morph.glassEffect(...) or button styles
Gradient .tint() on .glassProminentAPI accepts color onlySolid Color tint, or custom label without glassProminent tint
Glass on List/ScrollView rowsScroll + glass = visual glitches, perf costOpaque/material rows; glass only on fixed chrome
Shape applied to button labelMisses native padding (~13pt) and border rendering.buttonBorderShape()
Bottom bar via .overlayNo system blur bar treatment.safeAreaBar(.bottom)
Multiple glass views without containerNo merge effect, worse renderingGlassEffectContainer
Glass capsule on toolbar items that should be bareiOS 26 adds shared glass to toolbar groupings by default.sharedBackgroundVisibility(.hidden) on the ToolbarItem
.sharedBackgroundVisibility on inner viewDoes not remove toolbar glass backgroundApply on ToolbarItem (or other ToolbarContent)
Pre-enclosed SF Symbols in glass buttons (plus.circle, xmark.circle.fill)Redundant double enclosure ("circle in circle"); clashes with glass shapeUse unenclosed symbol (plus, xmark) and let .buttonBorderShape provide the container

Review checklist

  • No hand-rolled blur/material glass imitations
  • Buttons use .glass or .glassProminent with .buttonBorderShape()
  • Design spacing accounts for ~13pt internal button padding
  • Custom surfaces use .glassEffect(.regular, in: ...)
  • Adjacent glass wrapped in GlassEffectContainer
  • No glass inside scroll views
  • Bottom chrome uses .safeAreaBar(.bottom)
  • Toolbar items without glass use .sharedBackgroundVisibility(.hidden) on ToolbarItem
  • No pre-enclosed SF Symbols in glass buttons (e.g. "plus" instead of "plus.circle")
  • #available(iOS 26, *) with fallback on older OS

Additional resources

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Swiftui Liquid Glass AI skill do?

Implement, review, and refactor SwiftUI features using the iOS 26+ Liquid Glass API. Use when adopting Liquid Glass in new UI, converting existing surfaces to glass, reviewing glass usage for correctness, or fixing common Liquid Glass pitfalls (custom blur stacks, scroll views, button shapes, bottom bars, pre-enclosed symbols).

Why use Swiftui Liquid Glass on TypingMind?

Because you install it once and use it with any model. Swiftui Liquid Glass is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Swiftui Liquid Glass in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/FloWritesCode/fwc-swiftui-skills/tree/main/.agents/skills/swiftui-liquid-glass. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Swiftui Liquid Glass?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Swiftui Liquid Glass?

As many as you like. As long as a model supports skills, you can use Swiftui Liquid Glass with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Swiftui Liquid Glass AI skill free?

Yes. It is published on GitHub by FloWritesCode under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇