Liquid Glass Design
Implement Apple's Liquid Glass design language across all Apple UI frameworks. Covers SwiftUI (.glassEffect()), AppKit (NSGlassEffectView), UIKit (UIGlassEffect + UIVisualEffectView), and WidgetKit (rendering modes, accented content, glass elements in widgets).
When This Skill Activates
- User wants glass/blur effects on views
- User asks about Liquid Glass or modern Apple design
- User needs transparent, interactive UI elements
- User wants morphing transitions between views
- User is implementing glass effects in UIKit with
UIVisualEffectView - User needs
UIGlassEffectorUIGlassContainerEffect - User asks about scroll view edge effects in UIKit
- User wants Liquid Glass in widgets (WidgetKit)
- User needs to support accented rendering mode in widgets
- User asks about widget textures or mounting styles on visionOS
Design Rules (WWDC25)
Liquid Glass is the material of the navigation layer — bars, toolbars, floating controls — never the content layer (tables, lists, rows in a scroll view).
Scroll edge effects keep floating elements separated from scrolling content: soft (gradual fade — the iOS default) vs hard (denser, with a dividing line — mostly macOS). One per view edge, and they're not decorative — don't add one where no floating UI elements exist.
Shape system — let containers do the math:
Accessibility comes free at the system level: Reduced Motion decreases lensing and elastic effects; Increased Contrast renders glass elements black/white with a contrasting border. (Lensing is how glass appears — it materializes by modulating how it bends light, and adaptive shadows flip small elements light/dark for legibility over any content.)
Quick Start (SwiftUI)
Basic Glass Effect
Custom Shape
Interactive Glass
Tinted Glass
Glass Configuration Options
Multiple Glass Effects
GlassEffectContainer
When using multiple glass elements, wrap them in GlassEffectContainer for:
- Better rendering performance
- Proper blending between effects
- Morphing transitions
This is correctness, not just performance: glass can not sample other glass, so nearby glass elements must share ONE container to render and blend correctly.
Spacing Parameter:
- Controls when effects merge
- Smaller spacing = views must be closer to merge
- Larger spacing = effects merge at greater distances
Uniting Glass Effects
Combine views into a single glass effect using glassEffectUnion:
Morphing Transitions
Create fluid morphing effects when views appear/disappear.
Setup
- Create a namespace
- Assign glass effect IDs
- Use animations on state changes
Button Styles
Glass Button
Glass Prominent Button
Advanced Techniques
Background Extension
Extend a hero image beyond the safe area — the system mirrors and blurs it under bars and sidebars:
Or stretch content under sidebar or inspector:
Horizontal Scroll Under Sidebar
Tab Bar Behaviors
Toolbar Spacers
Split toolbar items into separate glass groups instead of customizing bar backgrounds:
Scroll Edge Effect Style
Sheets
Remove custom presentationBackground modifiers — they interfere with the sheet's glass material and its morphing behavior.
AppKit Implementation
NSGlassEffectView
NSGlassEffectContainerView
Interactive AppKit Glass
Common Patterns
Floating Action Bar
Card with Glass Effect
For a card floating above content (e.g. overlaid on a map). Cards inside a scrolling list are content-layer — don't use glass there. Note the icon uses a fill, not a second glassEffect: elements on glass never get glass again.
Tab Bar with Morphing
Migration from Old API
Before (Old Approach)
After (New API)
Key Differences
UIKit Implementation
UIGlassEffect
Use UIVisualEffectView with a UIGlassEffect to create glass surfaces in UIKit:
Customizing the Glass Effect
Interactive Glass in UIKit
Set isInteractive = true on a UIGlassEffect to make it respond to touch:
UIGlassContainerEffect
Use UIGlassContainerEffect when combining multiple glass elements. This is the UIKit equivalent of SwiftUI's GlassEffectContainer -- it enables proper blending and morphing between glass views:
Scroll View Edge Effects
UIKit scroll views now support configurable edge effects for Liquid Glass integration:
Available Edge Effect Styles:
UIScrollEdgeElementContainerInteraction
Coordinates glass elements (such as bottom toolbars) with scroll edge behavior:
Toolbar Integration
UIKit navigation bar items integrate with Liquid Glass automatically; hidesSharedBackground opts an item out of the shared glass bar:
UIKit vs SwiftUI Comparison
WidgetKit Implementation
Rendering Modes
Widgets support two rendering modes that affect how Liquid Glass is displayed:
Accented Mode
Detect the rendering mode and adapt layout accordingly. Use .widgetAccentable() to mark views that should be tinted in accented mode:
Grouping Accent Content
Image Rendering in Accented Mode
Container Backgrounds
Define a container background for your widget content:
Background Removal
Prevent the system from removing the widget background. Note that marking a background as non-removable excludes the widget from contexts that require removable backgrounds (iPad Lock Screen, StandBy):
visionOS Textures and Mounting Styles
Widget Textures
Mounting Styles
Custom Glass Elements in Widgets
Apply .glassEffect() and .buttonStyle(.glass) directly within widget views:
Best Practices
-
Use GlassEffectContainer for multiple glass views
- Improves rendering performance
- Enables morphing transitions
-
Apply glass effect last in modifier chain
- After frame, padding, and content modifiers
-
Choose appropriate spacing in containers
- Controls when effects blend together
-
Use animations for state changes
- Enables smooth morphing transitions
-
Add interactivity for touchable elements
.interactive()for buttons and controls
-
Tint sparingly — reserve tint for the primary action
- See Design Rules: tinting everything makes nothing stand out
-
Consistent shapes across your app
- Establish a shape language (all capsules, or all rounded rects)
Checklist
SwiftUI
- Use
.glassEffect()instead of.background(.material) - Wrap multiple glass views in
GlassEffectContainer - Add
@Namespacefor morphing transitions - Use
.glassEffectID()on views that appear/disappear - Add
.interactive()for touchable elements - Use
.buttonStyle(.glass)for glass buttons - Test animations for smooth morphing
UIKit
- Use
UIVisualEffectViewwithUIGlassEffectfor glass surfaces - Set
isInteractive = trueon glass effects for touchable elements - Wrap multiple glass views in
UIGlassContainerEffect - Configure scroll view edge effects (
.automaticor.hard) - Use
UIScrollEdgeElementContainerInteractionfor scroll-coordinated toolbars - Use
hidesSharedBackgroundfor toolbar items that need independent glass
WidgetKit
- Detect
widgetRenderingModeand adapt layout for accented mode - Mark accent content with
.widgetAccentable() - Set
.widgetAccentedRenderingMode()on images - Define
.containerBackground(for: .widget)for backgrounds - Use
.containerBackgroundRemovable(false)only when necessary - Apply
.glassEffect()and.buttonStyle(.glass)in widget views - Configure
.widgetTexture()and.supportedMountingStyles()for visionOS
General
- Glass only on the navigation layer — never on content (tables, lists)
- No glass stacked on glass; one variant (Regular or Clear) per interface
- Only the primary action is tinted
- Consider performance with many glass effects
- Support both light and dark appearances
References
SwiftUI
- Applying Liquid Glass to custom views
- Landmarks: Building an app with Liquid Glass
- SwiftUI GlassEffectContainer
AppKit
UIKit
- UIKit UIGlassEffect
- UIKit UIGlassContainerEffect
- UIKit UIVisualEffectView
- UIScrollEdgeElementContainerInteraction

