flowritescode/fwc-swiftui-skills/swiftui-liquid-glass
Claude Code and agent skill by flowritescode/fwc-swiftui-skills
- community
Checking that the SKILL.md file is still in the repository.
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).
Install
npx vskill@latest install flowritescode/fwc-swiftui-skills/swiftui-liquid-glassSKILL.md
SwiftUI Liquid Glass
Use native Liquid Glass APIs on iOS 26+. Do not recreate the effect with materials, blurs, or shadows.
Core rules
- Don't build custom Liquid Glass through adding backgrounds, outlines, blurs and shadows.
- Buttons — style: use
.buttonStyle(.glass)for non-colored buttons, and.buttonStyle(.glassProminent)for tinted buttons..glassProminentsupports.tint(), but this can only be a color (not a gradient). - Buttons — shape: use
.buttonBorderShape()instead of applying a shape to the button label by hand. - Buttons — padding: using this button setup adds roughly 13pt of padding inside the liquid glass shape; keep this in mind when adapting designs.
- Custom views: use
.glassEffect(.regular, in: ...)to embed custom Views inside liquid glass containers. - Grouped glass: use
GlassEffectContainerwhen multiple liquid glass elements are next to each other. this View / Container adds a liquid merge effect when the elements grow / touch each other. - Scrolling: avoid using liquid glass inside ScrollView and List (anything that scrolls).
- 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. - 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. - SF Symbols — no pre-enclosed symbols: do not use pre-enclosed SF Symbol variants (such as
plus.circle,xmark.circle.fill, ortrash.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
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 theToolbarItem. - 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
- Pick the right primitive (button style vs
glassEffectvssafeAreaBar). - Apply layout and typography first; add glass modifiers last.
- Wrap adjacent glass elements in
GlassEffectContainer. - Account for ~13pt internal button padding when matching designs.
- Use unenclosed SF Symbols so the glass shape provides the enclosing geometry.
- Add iOS 26 availability checks and pre-26 fallbacks.
Patterns
Glass buttons
Do not clip the label yourself:
Do not use pre-enclosed SF Symbols inside glass buttons:
Custom glass surfaces
Add .interactive() when the surface responds to touch:
Grouped glass (merge effect)
Tune spacing to control how close elements must be before the liquid merge kicks in.
Bottom action bar
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:
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:
Availability fallback
Anti-patterns
| Anti-pattern | Why it fails | Do instead | |
|---|---|---|---|
.background(.ultraThinMaterial) + blur + stroke + shadow | Not Liquid Glass; wrong optics and no merge/morph | .glassEffect(...) or button styles | |
Gradient .tint() on .glassProminent | API accepts color only | Solid Color tint, or custom label without glassProminent tint | |
Glass on List/ScrollView rows | Scroll + glass = visual glitches, perf cost | Opaque/material rows; glass only on fixed chrome | |
| Shape applied to button label | Misses native padding (~13pt) and border rendering | .buttonBorderShape() | |
Bottom bar via .overlay | No system blur bar treatment | .safeAreaBar(.bottom) | |
| Multiple glass views without container | No merge effect, worse rendering | GlassEffectContainer | |
| Glass capsule on toolbar items that should be bare | iOS 26 adds shared glass to toolbar groupings by default | .sharedBackgroundVisibility(.hidden) on the ToolbarItem | |
.sharedBackgroundVisibility on inner view | Does not remove toolbar glass background | Apply 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 shape | Use unenclosed symbol (plus, xmark) and let .buttonBorderShape provide the container |
Review checklist
- [ ] No hand-rolled blur/material glass imitations
- [ ] Buttons use
.glassor.glassProminentwith.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)onToolbarItem - [ ] 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
- Detailed API notes and morphing transitions: reference.md
- Applying Liquid Glass to custom views
- Landmarks: Building an app with Liquid Glass
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/swiftui-liquid-glass/SKILL.md
Popularity
- Repository stars
- 349
- Repository forks
- 16
- 7-day trend score
- 29
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/flowritescode/fwc-swiftui-skills/swiftui-liquid-glass)