swiftui-liquid-glass▌
dpearson2699/swift-ios-skills · updated Apr 29, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
SwiftUI Liquid Glass effects for iOS 26+ with interactive glass containers, morphing transitions, and button styles.
- ›Provides .glassEffect() modifier for applying translucent Liquid Glass material to custom views, with support for tinting, interactivity, and custom shapes
- ›Includes GlassEffectContainer for grouping and blending multiple glass elements, plus glassEffectID and glassEffectUnion for morphing animations during view hierarchy changes
- ›Offers pre-built button styles ( .glass
SwiftUI Liquid Glass
Liquid Glass is the dynamic translucent material introduced in iOS 26 (and iPadOS 26, macOS 26, tvOS 26, watchOS 26). It blurs content behind it, reflects surrounding color and light, and reacts to touch and pointer interactions. Standard SwiftUI components (tab bars, toolbars, navigation bars, sheets) adopt Liquid Glass automatically when built with the iOS 26 SDK. Use the APIs below for custom views and controls.
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
- Identify target surfaces (cards, chips, floating controls, custom bars).
- Decide shape, prominence, and whether each element needs interactivity.
- Wrap grouped glass elements in a
GlassEffectContainer. - Apply
.glassEffect()after layout and appearance modifiers. - Add
.interactive()only to tappable/focusable elements. - Add morphing transitions with
glassEffectID(_:in:)where the view hierarchy changes with animation. - Gate with
if #available(iOS 26, *)and provide a fallback for earlier versions.
2. Improve an existing feature with Liquid Glass
- Find custom blur/material backgrounds that can be replaced with
.glassEffect(). - Wrap sibling glass elements in
GlassEffectContainerfor blending and performance. - Replace custom glass-like buttons with
.buttonStyle(.glass)or.buttonStyle(.glassProminent). - Add morphing transitions where animated insertion/removal occurs.
3. Review existing Liquid Glass usage
Run through the Review Checklist below and verify each item.
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 (minimal tint) |
.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 types: .matchedGeometry (default when within spacing), .materialize
(fade content + animate glass in/out), .identity (no transition).
Button Styles
Button("Action") { }
.buttonStyle(.glass) // standard glass button
Button("Primary") { }
.buttonStyle(.glassProminent) // prominent glass button
Scroll Edge Effects and Background Extension (iOS 26+)
These complement Liquid Glass when building custom toolbars and scroll views:
ScrollView {
content
}
.scrollEdgeEffectStyle(.soft, for: .top) // Configures edge effect at scroll boundaries
// Duplicate view into mirrored copies at safe area edges with blur (e.g., under sidebars)
content
.backgroundExtensionEffect()
ToolbarSpacer (iOS 26+)
Creates a visual break between items in toolbars:
.toolbar {
ToolbarItem { Button("Edit") { } }
ToolbarSpacer(.fixed)
ToolbarItem { Button("Share") { } }
}
Code Examples
Basic glass effect with availability gate
if #available(iOS 26, *) {
Text("Status")
.padding()
.glassEffect(.regular.interactive(), in: .rect(cornerRadius: 16))
} else {
Text("Status")
.padding()
.background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 16))
}
Grouped glass elements in a container
GlassEffectContainer(spacing: 24) {
HStack(spacing: 24) {
ForEach(tools) { tool in
Image(systemName: tool.icon)
.frame(width: 56, height: 56)
.glassEffect(.regular.interactive())
}
}
}
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)
}
}
}
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 how to use swiftui-liquid-glassHow to use swiftui-liquid-glass on Cursor
AI-first code editor with Composer
1Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add swiftui-liquid-glass
2Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
$npx skills add https://github.com/dpearson2699/swift-ios-skills --skill swiftui-liquid-glassThe skills CLI fetches swiftui-liquid-glass from GitHub repository dpearson2699/swift-ios-skills and configures it for Cursor.
3Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
◆ Which agents do you want to install to?││ ── Universal (.agents/skills) ── always included ────│ • Amp│ • Antigravity│ • Cline│ • Codex│ ●Cursor(selected)│ • Cursor│ • Windsurf4Verify installation
Confirm successful installation by checking the skill directory location:
.cursor/skills/swiftui-liquid-glassReload or restart Cursor to activate swiftui-liquid-glass. Access the skill through slash commands (e.g., /swiftui-liquid-glass) or your agent's skill management interface.
⚠Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
Additional Resources
List & Monetize Your Skill
Submit your Claude Code skill and start earning
GET_STARTED →Use Cases▌
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
✓Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
✓Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
✓Improve work quality by 30-40% with less effort
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Installation Steps
- 1.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 5.Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices▌
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This▌
✓ Use When
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid When
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
general reviewsRatings
4.5★★★★★36 reviews- ★★★★★Olivia Rahman· Dec 28, 2024
I recommend swiftui-liquid-glass for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Charlotte Khan· Dec 8, 2024
swiftui-liquid-glass is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Luis Bansal· Nov 19, 2024
Keeps context tight: swiftui-liquid-glass is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Aisha Choi· Nov 7, 2024
Registry listing for swiftui-liquid-glass matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Charlotte Flores· Oct 26, 2024
swiftui-liquid-glass reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Nia Perez· Oct 10, 2024
swiftui-liquid-glass is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Yash Thakker· Sep 25, 2024
I recommend swiftui-liquid-glass for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Luis Khanna· Sep 21, 2024
I recommend swiftui-liquid-glass for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Noah Haddad· Sep 9, 2024
swiftui-liquid-glass fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Isabella Smith· Aug 28, 2024
We added swiftui-liquid-glass from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
showing 1-10 of 36
1 / 4