Engineering
swiftui-liquid-glass avatar

swiftui-liquid-glass

Implement, review, or improve SwiftUI features using the iOS 26+ Liquid Glass API for modern, performance-aware UI design.

Introduction

This agent skill provides specialized support for developers adopting the iOS 26+ Liquid Glass design system in SwiftUI applications. It serves as a comprehensive guide for implementing native glass-like aesthetics, ensuring that components such as surfaces, buttons, and containers align with Apple's design guidance. The skill is designed for engineers tasked with modernizing existing UI or building high-fidelity, interactive glass interfaces while maintaining rigorous performance standards.

The skill assists in navigating the complexities of the Liquid Glass API, specifically focusing on the correct modifier order, effective use of GlassEffectContainer for grouped elements, and appropriate implementation of interactive glass components. It also helps manage accessibility and platform compatibility by ensuring that features are correctly gated with #available(iOS 26, *) checks, providing non-glass fallbacks for legacy versions of the operating system. Users will benefit from guided workflows for reviewing codebases, identifying opportunities for glass treatments, and implementing morphing transitions.

  • Expert guidance on utilizing glassEffect, GlassEffectContainer, and glass-based button styles (e.g., .buttonStyle(.glassProminent)).

  • Streamlined workflows for refactoring legacy SwiftUI views to support modern material-based aesthetics.

  • Architectural recommendations for modifier chaining to ensure the glass effect is applied after core layout and appearance modifications.

  • Best practices for interactive elements, including pointer-responsive glass and shape consistency across view hierarchies.

  • Automated review checklists to verify accessibility, API gating, and performance considerations.

  • Integration with project-specific documentation and design references to ensure alignment with existing UI components.

  • Always gate new features with availability checks to prevent runtime crashes on older iOS versions.

  • Use GlassEffectContainer when grouping multiple glass elements to optimize rendering performance and maintain visual cohesion.

  • Prioritize native Liquid Glass APIs over custom blur overlays for better performance and battery efficiency.

  • Apply interactive() modifiers only to elements requiring specific touch or pointer feedback to minimize overhead.

  • When implementing complex UI transitions, use glassEffectID alongside @Namespace to enable smooth morphing effects between states.

Repository Stats

Stars
312
Forks
46
Open Issues
1
Language
Vim Script
Default Branch
main
Sync Status
Idle
Last Synced
Apr 29, 2026, 06:21 AM
View on GitHub