liquid-glass
Liquid Glass Design System
Apple's new material design combining glass optics with fluid interaction. Available across all platforms.
Quick Reference — SwiftUI
// Basic glass effect (capsule shape by default)
view.glassEffect()
// Custom shape
view.glassEffect(in: .rect(cornerRadius: 16))
view.glassEffect(in: .circle)
// Tinted glass (suggests prominence)
view.glassEffect(.regular.tint(.blue))
// Interactive (responds to touch/pointer)
view.glassEffect(.regular.interactive())
// Button styles
Button("Primary") { }.buttonStyle(.glassProminent)
Button("Secondary") { }.buttonStyle(.glass)
// Container for multiple glass views (required for merging/performance)
GlassEffectContainer(spacing: 40) {
HStack(spacing: 40) {
ItemView().glassEffect()
ItemView().glassEffect()
}
}
// Morphing transitions between glass views
@Namespace var ns
view.glassEffect().glassEffectID("myID", in: ns)
// Unite multiple views into single glass shape
view.glassEffect().glassEffectUnion(id: "group1", namespace: ns)
Critical Constraints
- ❌ DO NOT apply multiple glass effects without
GlassEffectContainer→ ✅ Wrap inGlassEffectContainerfor performance and merging - ❌ DO NOT forget
.interactive()on buttons/controls → ✅ Add.interactive()for touch/pointer response - ❌ DO NOT use heavy tint alpha values → ✅ Use subtle tints (0.2–0.3 alpha) for glass aesthetic
- ❌ DO NOT apply
.glassEffect()before layout modifiers → ✅ Apply after.frame(),.padding(), etc. - ❌ DO NOT use old
NSVisualEffectViewwith.materialfor new designs → ✅ UseNSGlassEffectView(AppKit) or.glassEffect()(SwiftUI)
Reference Index
| File | When to Use |
|---|---|
references/swiftui-glass.md |
SwiftUI glass effects, containers, morphing, button styles |
references/appkit-glass.md |
AppKit NSGlassEffectView, NSGlassEffectContainerView, hover effects |
references/uikit-glass.md |
UIKit UIGlassEffect, scroll edge effects, container effects |
references/widgetkit-glass.md |
Widget accented rendering mode, widgetAccentable modifier |
Decision Tree
Building SwiftUI interface?
├── Single glass element → .glassEffect() on the view
├── Multiple glass elements → Wrap in GlassEffectContainer
├── Need morphing transitions → Use @Namespace + .glassEffectID()
├── Grouping elements into one shape → Use .glassEffectUnion()
└── Buttons → .buttonStyle(.glass) or .buttonStyle(.glassProminent)
Building AppKit interface?
├── Single glass element → NSGlassEffectView with contentView
├── Multiple glass elements → NSGlassEffectContainerView
└── Hover/interaction → NSTrackingArea + animator().tintColor
Building Widgets?
├── Support tinted/clear appearance → Check widgetRenderingMode
├── Mark accent content → .widgetAccentable()
└── Custom glass in widget → .glassEffect() (same as SwiftUI)
Common Mistakes & Fixes
| Mistake | Fix |
|---|---|
| Glass views don't merge when close | Wrap in GlassEffectContainer with appropriate spacing |
| No animation when glass appears/disappears | Use withAnimation { } + glassEffectID |
| Glass button doesn't respond to hover | Add .interactive() to the glass effect |
| Too many glass effects = performance drop | Limit glass effects; use GlassEffectContainer |
| Widget looks wrong in tinted mode | Check widgetRenderingMode environment, use widgetAccentable() |
References
More from makgunay/claude-swift-skills
macos-app-structure
macOS application architecture patterns covering App protocol (@main), Scene types (WindowGroup, Window, Settings, MenuBarExtra), multi-window management, NSApplicationDelegateAdaptor for AppKit lifecycle hooks, Info.plist configuration (LSUIElement for menu bar apps, NSAccessibilityUsageDescription), entitlements for sandbox/hardened runtime, and project structure conventions. Use when scaffolding a new macOS app, configuring scenes and windows, setting up menu bar apps, or resolving macOS-specific lifecycle issues. Corrects the common LLM mistake of generating iOS-only app structures.
31macos-permissions
macOS permission handling for Accessibility (AXIsProcessTrusted), Screen Recording, Full Disk Access, input monitoring, camera, microphone, location, and contacts. Covers TCC (Transparency Consent and Control) database, graceful degradation when permissions are denied, permission prompting patterns, opening System Settings to the correct pane, detecting permission changes, and the privacy manifest (PrivacyInfo.xcprivacy) requirement. Use when implementing features that require system permissions, building permission onboarding flows, or handling denied permissions gracefully.
17swiftui-core
Core SwiftUI patterns for macOS and iOS development including navigation (NavigationSplitView, NavigationStack), state management (@State, @Binding, @Environment, @Bindable with @Observable), the new customizable toolbar system (toolbar IDs, ToolbarSpacer, DefaultToolbarItem, searchToolbarBehavior, matchedTransitionSource, sharedBackgroundVisibility), styled text editing (TextEditor with AttributedString, AttributedTextSelection, transformAttributes, textFormattingDefinition), and layout patterns. Use when building any SwiftUI view, implementing navigation, managing state, creating toolbars, or building rich text editors. Corrects common LLM errors like using deprecated NavigationView, wrong state wrappers, and outdated toolbar APIs.
14tech-stack-validator
Validates and recommends technology stacks for native macOS/iOS app projects against PRD and architecture requirements. Reads the PRD and architecture documents (or gathers requirements interactively), then systematically checks every technology choice for: OS version availability, framework capability gaps, performance feasibility, distribution compatibility (sandbox vs direct), API deprecation risks, dependency conflicts, and timeline realism for the team size. Produces a structured validation report with go/no-go verdicts, risk flags, and alternative recommendations. Use when user says things like 'validate my tech stack', 'check if this architecture works', 'what should I build this with', 'is SwiftData the right choice', 'can I ship this on the App Store', 'review my architecture', or before starting implementation of any PRD. Also use when migrating between tech stacks or evaluating whether to adopt a new framework.
9swift-lang
Swift 6.2 language patterns and critical corrections for LLM code generation. Covers the concurrency paradigm shift (default MainActor isolation, @concurrent for background work, isolated conformances, nonisolated opt-out), @Observable vs ObservableObject, structured concurrency, modern error handling, property wrappers, InlineArray, Span, and value generics. Use whenever generating Swift code, especially async/concurrent code, class/struct design, or performance-critical paths. This skill prevents the most common LLM mistakes in Swift code generation.
8app-prd-architect
Guided app discovery, PRD generation, and architectural design for native macOS/iOS applications. Takes the user from a rough app idea through an interactive exploration of features, user experience, and design vision, then produces three deliverables: (1) a comprehensive PRD with functional requirements, user stories, and success metrics, (2) a technical architecture document with data models, system diagrams, and component design, (3) a feature list for non-technical stakeholders. Use when user says things like 'I have an app idea', 'help me plan an app', 'write a PRD', 'design the architecture for', 'what should my app do', 'help me think through features', or 'I want to build an app that...'. Also use when user has an existing PRD draft and wants to expand, validate, or restructure it. Guides through iterative discovery before producing documents — never jumps straight to writing.
8