Axiom liquid glass

From coco-research/coco · View interactive version

Axiom liquid glass is an AI agent skill from the GitHub repository coco-research/coco. Use when implementing, reviewing, or debugging Apple Liquid Glass: iOS 26+ adoption, Regular vs Clear variants, tinting, scroll edge effects, or an iOS-native redesign review.

How to use this skill

Skill file

Liquid Glass — Apple's Design System

When to Use This Skill


Part 1: Design Philosophy

Core Principles

Avoid trendy glassmorphism gimmicks. Glass effects should appear only where they improve clarity and depth. Every screen should feel like it belongs in a first-party Apple app.

What is Liquid Glass?

Liquid Glass is Apple's next-generation material design system introduced at WWDC 2025. It represents a significant evolution from previous materials (Aqua, iOS 7 blurs, Dynamic Island) by creating a new digital meta-material that:

iOS Material Hierarchy

Use glass materials to express depth and context:

| Material | Use For | Visual Weight |

|----------|---------|---------------|

| Ultra-thin | Subtle overlays, toolbars, floating controls | Lightest |

| Regular | Cards needing gentle separation | Medium |

| Thick | Bottom sheets, modals, areas requiring strong readability | Heaviest |

Rules:


Part 2: Visual Properties

1. Lensing (Primary Characteristic)

Liquid Glass defines itself through lensing — the warping and bending of light that communicates presence, motion, and form. Unlike previous materials that scattered light, Liquid Glass uses instinctive visual cues from the natural world.

2. Motion & Fluidity

3. Adaptive Behavior

Liquid Glass continuously adapts without fixed light/dark appearance:


Part 3: Implementation Guide

Basic API Usage — SwiftUI `glassEffect` Modifier

// Basic usage - applies glass within capsule shape
Text("Hello")
    .glassEffect()

// Custom shape
Text("Hello")
    .glassEffect(in: RoundedRectangle(cornerRadius: 12))

// Interactive elements (iOS)
Button("Tap Me") { }
    .glassEffect()
    .interactive()

Automatic Adoption: Simply recompiling with Xcode 26 brings Liquid Glass to standard controls automatically.

Variants: Regular vs Clear

CRITICAL DECISION: Never mix Regular and Clear in the same interface.

Regular Variant (Default — Use 95% of the Time)

When to use: Navigation bars, tab bars, toolbars, buttons, menus, sidebars

NavigationView {
    // Content
}
.glassEffect() // Uses Regular variant by default
Clear Variant (Special Cases Only)

Use ONLY when ALL three conditions are met:

  1. Element is over media-rich content
  2. Content layer won't be negatively affected by dimming layer
  3. Content above glass is bold and bright
ZStack {
    MediaRichBackground()
        .overlay(.black.opacity(0.3)) // Dimming layer
    BoldBrightControl()
        .glassEffect(.clear)
}

WARNING: Using Clear without meeting all three conditions results in poor legibility.

Design Principles & Best Practices

Reserve Glass for Navigation Layer
[Content Layer — No Glass]
    |
[Navigation Layer — Liquid Glass]
    - Tab bars, Navigation bars, Toolbars, Floating controls
DO NOT Use on Content Layer
// WRONG
List(items) { item in
    Text(item.name)
}
.glassEffect() // Competes with navigation, muddy hierarchy
DO NOT Stack Glass on Glass
// WRONG
ZStack {
    NavigationBar().glassEffect()
    FloatingButton().glassEffect() // Glass on glass
}

// CORRECT
ZStack {
    NavigationBar().glassEffect()
    FloatingButton()
        .foregroundStyle(.primary) // Use fills, transparency, vibrancy
}
Avoid Content Intersections in Steady State

Reposition or scale content to maintain separation. Intersections are acceptable during scrolling/transitions.


Part 4: Tinting & Color

Adaptive Tinting System

  1. Selecting color generates range of tones
  2. Tones mapped to content brightness underneath
  3. Changes hue, brightness, saturation based on background
  4. Doesn't deviate too much from intended color
Button("Primary Action") { }
    .tint(.red)
    .glassEffect()

Tinting Rules

// WRONG - Solid fill breaks glass character
Button("Action") {}
    .background(.red) // Opaque

// CORRECT - Transparent, grounded
Button("Action") {}
    .tint(.red)
    .glassEffect()

Part 5: Scroll Edge Effects

Work in concert with Liquid Glass to maintain separation with scrolling content.

Hard Style Effect

Use when pinned accessory views exist:

ScrollView { }
    .scrollEdgeEffect(.hard)

Part 6: Layout & Component Patterns

Typography

Color

Buttons

Lists

Navigation

Modals & Sheets

Layout Principles


Part 7: Layered System Architecture

1. Highlights Layer

2. Shadows Layer

3. Internal Glow (Interaction Feedback)

4. Adaptive Tinting Layer


Part 8: Accessibility

Liquid Glass offers accessibility features that modify material without sacrificing its magic:

| Feature | Effect | Developer Action |

|---------|--------|-----------------|

| Reduced Transparency | Makes glass frostier, obscures more | Automatic |

| Increased Contrast | Elements predominantly black/white with contrasting border | Automatic |

| Reduced Motion | Decreases intensity, disables elastic properties | Automatic |

No developer action required — all features apply automatically when using Liquid Glass.


Part 9: Performance Considerations

View Hierarchy

// WRONG - Deep nesting
ZStack {
    GlassContainer1().glassEffect()
    ZStack {
        GlassContainer2().glassEffect()
    }
}

// CORRECT - Flat hierarchy
VStack {
    GlassContainer1().glassEffect()
    GlassContainer2().glassEffect()
}

Rendering Costs


Part 10: Testing

Visual Regression Testing

func testLiquidGlassAppearance() {
    let app = XCUIApplication()
    app.launch()

    // Test light mode
    XCTContext.runActivity(named: "Light Mode Glass") { _ in
        let screenshot = app.screenshot()
    }

    // Test dark mode
    app.launchArguments = ["-UIUserInterfaceStyle", "dark"]
    app.launch()
    XCTContext.runActivity(named: "Dark Mode Glass") { _ in
        let screenshot = app.screenshot()
    }
}

Critical Test Cases

Accessibility Testing

func testLiquidGlassAccessibility() {
    app.launchArguments += [
        "-UIAccessibilityIsReduceTransparencyEnabled", "1",
        "-UIAccessibilityButtonShapesEnabled", "1",
        "-UIAccessibilityIsReduceMotionEnabled", "1"
    ]
    XCTAssertTrue(glassElement.exists)
    XCTAssertTrue(glassElement.isHittable)
}

Part 11: Design Review & Push-Back Framework

Red Flags — Requests That Violate Guidelines

If you hear ANY of these, STOP and reference the skill:

How to Push Back Professionally

Step 1: Show the Framework

"Let me show you Apple's guidance on Clear variant.
It requires THREE conditions:
1. Media-rich content background
2. Dimming layer for legibility
3. Bold, bright controls on top
Let me show which screens meet all three..."

Step 2: Demonstrate the Risk

Open the app on a device. Show Clear variant in low-contrast scenario (unreadable) vs Regular (legible).

Step 3: Offer Compromise

"Clear works beautifully in these hero sections where all three conditions apply.
Regular handles everything else with automatic legibility. Best of both worlds."

Step 4: Document the Decision

If overruled, send written documentation of the decision and monitoring plan.


Part 12: Expert Review Checklist

1. Material Appropriateness

2. Variant Selection

3. Legibility & Contrast

4. Layering & Hierarchy

5. Scroll Edge Effects

6. Accessibility

7. Performance


Part 13: API Reference

SwiftUI Modifiers

`glassEffect(in:isInteractive:)`
func glassEffect<S: Shape>(
    in shape: S = Capsule(),
    isInteractive: Bool = false
) -> some View
`glassEffect(_:in:isInteractive:)`
func glassEffect<S: Shape>(
    _ variant: GlassVariant,  // .regular or .clear
    in shape: S = Capsule(),
    isInteractive: Bool = false
) -> some View
`scrollEdgeEffect(_:)`
func scrollEdgeEffect(_ style: ScrollEdgeStyle) -> some View
// styles: .automatic, .soft, .hard
`scrollEdgeEffectStyle(_:for:)` (NEW in iOS 26)
func scrollEdgeEffectStyle(_ style: ScrollEdgeStyle, for edges: Edge.Set) -> some View
`glassBackgroundEffect()` (NEW in iOS 26)

Apply glass effect to custom views for reflecting surrounding content.

CustomPhotoGrid()
    .glassBackgroundEffect()
`GlassEffectContainer` (NEW in iOS 26)

Container for combining multiple Liquid Glass effects with optimized rendering.

GlassEffectContainer {
    HStack {
        Button("Action 1") { }.glassEffect()
        Button("Action 2") { }.glassEffect()
    }
}

Benefits: Optimizes rendering, fluid morphing between glass shapes, reduced compositor overhead.

Toolbar Modifiers (NEW in iOS 26)

`Spacer(.fixed)` in Toolbars

Separates toolbar button groups with fixed spacing.

`.buttonStyle(.borderedProminent)` + `.tint()` in Toolbars

Makes toolbar items prominent with Liquid Glass tinting.

Navigation & Search (NEW in iOS 26)

Types

enum GlassVariant {
    case regular  // Default - full adaptive behavior
    case clear    // More transparent, no adaptation
}

enum ScrollEdgeStyle {
    case automatic  // System determines
    case soft       // Gradual fade
    case hard       // Uniform across toolbar height
}

Part 14: Backward Compatibility

UIDesignRequiresCompatibility Key (NEW in iOS 26)

Add to Info.plist to maintain iOS 18 appearance while building with iOS 26 SDK:

<key>UIDesignRequiresCompatibility</key>
<true/>

Migration strategy:

  1. Ship with key enabled
  2. Audit interface changes in separate build
  3. Update interface incrementally
  4. Remove key when ready for Liquid Glass

Output Requirements (For UI Redesigns)

For each redesigned screen, provide:

  1. Design intent — What feels more iOS-native and why
  2. Layout structure — Regions, spacing, safe-area decisions
  3. Material map — Where glass is used, which thickness, and why
  4. Typography map — Text styles and hierarchy rationale
  5. Interaction & motion notes — Scroll, transitions, gestures
  6. iOS-native justification — System defaults, familiarity, clarity

Absolute Avoid List


Resources

WWDC: 2025-219, 2025-323, 2025-256

Docs: /technologyoverviews/adopting-liquid-glass, /swiftui/landmarks-building-an-app-with-liquid-glass, /swiftui/applying-liquid-glass-to-custom-views

Related Skills: axiom-liquid-glass-ref, swiftui-liquid-glass

Platforms: iOS 26+, iPadOS 26+, macOS Tahoe, visionOS 3

Xcode: 26+

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.