Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

liquid-glass液体玻璃

Agent Skill

liquid-glass 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

188

周安装

8

GitHub Stars

7

下载量

66
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:liquid-glass(液体玻璃)
来源仓库:https://github.com/haider-nawaz/liquid-glass-skill
仓库路径:skills/liquid-glass
安装命令:
npx skills add https://github.com/haider-nawaz/liquid-glass-skill --skill liquid-glass
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/haider-nawaz/liquid-glass-skill --skill liquid-glass

简介

liquid-glass 用于查找、检索和筛选相关信息,支持按关键词定位内容。

  • 适合在研究、资料收集或信息探索类任务中快速获取候选结果。
  • 通过 GitHub 安装,兼容 Codex、Claude、Cursor 和 Gemini CLI 等平台。
  • 使用前需确认其是否联网、能否访问外部资源及操作权限范围。
  • 建议结合原始 README 验证功能细节,避免依赖未经验证的输出。

SKILL.md

Liquid Glass Design System for Apple Platforms

Build and migrate SwiftUI apps using Apple's Liquid Glass design language introduced at WWDC 2025. This skill covers iOS 26, iPadOS 26, macOS 26 (Tahoe), watchOS 26, tvOS 26, and visionOS 26.

Important: Use Latest Documentation

Always fetch the latest Apple developer documentation when implementing Liquid Glass features. The APIs may evolve between OS betas. Key documentation URLs to reference:

  • https://developer.apple.com/documentation/SwiftUI/Applying-Liquid-Glass-to-custom-views
  • https://developer.apple.com/documentation/swiftui/view/glasseffect(_:in:)
  • https://developer.apple.com/documentation/SwiftUI/Landmarks-Building-an-app-with-Liquid-Glass
  • https://developer.apple.com/videos/play/wwdc2025/323/ (WWDC25 Session: Build a SwiftUI app with the new design)

Core Concept

Liquid Glass is a translucent, dynamic material exclusively for the navigation layer (toolbars, tab bars, buttons, controls) that floats above app content. It bends and refracts light in real-time, responds to device motion with specular highlights, and adapts continuously to background content.

Never apply glass to content itself (lists, tables, media, text blocks). Glass is for controls and navigation only.

Quick Start: Key APIs

1. Glass Effect on Custom Views

// Basic - capsule shape (default)
Text("Label")
    .padding()
    .glassEffect()

// With shape and style
Image(systemName: "heart.fill")
    .padding()
    .glassEffect(.regular, in: .rect(cornerRadius: 16))

// Tinted glass
Text("Tinted")
    .padding()
    .glassEffect(.regular.tint(.blue))

// Interactive glass (scales, bounces, shimmers on touch - iOS only)
Button("Tap Me") { }
    .glassEffect(.regular.interactive())

2. Glass Styles

StyleUse CaseTransparency
.regularStandard UI: toolbars, buttons, nav barsMedium
.clearMedia-rich backgrounds where content is bold/brightHigh
.identityConditionally disable glass (accessibility)None

3. GlassEffectContainer (Critical)

Glass cannot sample other glass. Nearby glass elements MUST share a container for visual consistency and morphing.

GlassEffectContainer(spacing: 30.0) {
    Button("Action 1") { }
        .glassEffect()
        .glassEffectID("btn1", in: namespace)

    Button("Action 2") { }
        .glassEffect()
        .glassEffectID("btn2", in: namespace)
}

4. Morphing Transitions

Use @Namespace + glassEffectID inside a GlassEffectContainer for smooth glass morphing:

@Namespace private var namespace
@State private var isExpanded = false

GlassEffectContainer(spacing: 16) {
    if isExpanded {
        ForEach(items) { item in
            ItemView(item: item)
                .glassEffect(.regular, in: .rect(cornerRadius: 24))
                .glassEffectID(item.id, in: namespace)
        }
    }
    Button {
        withAnimation { isExpanded.toggle() }
    } label: { Label("Toggle", systemImage: "chevron.down") }
    .buttonStyle(.glass)
    .glassEffectID("toggle", in: namespace)
}

5. Background Extension Effect

Extends and blurs visual content behind navigation elements (toolbars, sidebars, inspectors):

Image(landmark.backgroundImageName)
    .resizable()
    .aspectRatio(contentMode: .fill)
    .frame(minWidth: 0, maxWidth: .infinity, minHeight: 0, maxHeight: .infinity)
    .backgroundExtensionEffect()

6. Glass Buttons

// Standard glass button
Button("Action") { }
    .buttonStyle(.glass)

// Prominent glass button (for primary actions)
Button("Save") { }
    .buttonStyle(.glassProminent)

7. Toolbars with Glass

Toolbar items automatically receive glass styling. Use ToolbarSpacer and ToolbarItemGroup for layout:

.toolbar {
    ToolbarSpacer(.flexible)
    ToolbarItem { ShareLink(item: data, preview: preview) }
    ToolbarSpacer(.fixed)
    ToolbarItemGroup {
        Button("Favorite", systemImage: "heart") { }
        Button("Add", systemImage: "plus") { }
    }
    ToolbarItem {
        Button("Info", systemImage: "info") { }
    }
}
.toolbar(removing: .title) // Remove title for clean glass toolbar

8. Tab Bars

Tab bars automatically adopt glass when compiled with Xcode 26:

TabView {
    Tab("Home", systemImage: "house") { HomeView() }
    Tab("Search", systemImage: "magnifyingglass") { SearchView() }
}
.tabBarMinimizeBehavior(.onScrollDown) // Collapse tab bar on scroll

9. Sheets with Glass

Partial-height sheets automatically get Liquid Glass backgrounds:

.sheet(isPresented: $showSheet) {
    SheetContent()
        .presentationDetents([.medium, .large])
    // Do NOT add .presentationBackground() - system handles it
}

Migration Workflow (Existing Apps)

For detailed migration steps, see references/migration-guide.md.

Summary:

  1. Compile with Xcode 26 SDK - system components auto-adopt glass
  2. Remove custom toolbar backgrounds (.toolbarBackground)
  3. Replace custom materials on navigation elements with glass modifiers
  4. Wrap grouped glass elements in GlassEffectContainer
  5. Add .backgroundExtensionEffect() to hero images
  6. Update SF Symbol variants (circle variants -> none variants on iOS 26+)
  7. Test accessibility (Reduced Transparency, Increased Contrast, Reduced Motion)

Platform Considerations

For platform-specific details, see references/platform-specifics.md.

Key differences:

  • macOS: Use .tint(.clear) on glass buttons for proper rendering; use WindowBackgroundShapeStyle.windowBackground instead of Material for editing backgrounds
  • iOS (iPhone): .interactive() works; use UIDevice.current.userInterfaceIdiom for layout
  • iPadOS: Larger grid sizes; sidebar adaptable tab views
  • Conditional compilation: Use #if os(macOS) / #if os(iOS) for platform-specific code

Common Pitfalls

For detailed pitfalls and solutions, see references/pitfalls-and-solutions.md.

Critical issues:

  • Glass elements outside GlassEffectContainer produce inconsistent visuals
  • rotationEffect on glass views causes shape morphing - bridge to UIKit with UIGlassEffect
  • Menu labels with glass cause animation artifacts - use custom ButtonStyle
  • Hit-testing only registers on content, not glass area - use contentShape() to fix
  • Multiple glass effects = multiple CABackdropLayer instances (3 offscreen textures each) - use containers to group

Real-World Example Patterns

For complete code patterns from Apple's Landmarks sample app, see examples/landmarks-patterns.md.

Architecture Best Practices

  1. NavigationSplitView as app root with glass sidebar
  2. NavigationStack for deep navigation within detail columns
  3. @Observable data model with @Environment injection
  4. FlexibleHeader pattern: stretching hero images with scroll-linked parallax
  5. .inspector() for supplementary detail panels
  6. .searchable() for global search (auto-styled with glass)
  7. Use ToolbarSpacer(.flexible) and ToolbarSpacer(.fixed) for toolbar layout
  8. Prefer symbol-based buttons with text labels in toolbars
  9. Use .symbolVariant() modifier for SF Symbol state changes
  10. Use .symbolEffect(.drawOn) for animated icon transitions

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.33%
按下载量换算23

Claude

30.61%
按下载量换算20

Cursor

18.29%
按下载量换算12

Gemini CLI

8.4%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills