帮助开发者与设计师实现 iOS 液态玻璃动态界面与交互效果。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "liquid-glass-design" 技能: 1. 下载 https://raw.githubusercontent.com/affaan-m/ECC/main/skills/liquid-glass-design/SKILL.md 2. 保存为 ~/.claude/skills/liquid-glass-design/SKILL.md 3. 装好后重载技能,告诉我可以用了
请用 SwiftUI 创建一个 iOS 26 Liquid Glass 风格的信息卡片,包含背景模糊、边缘高光、轻微反射效果,以及点击时的形变动画,并附上可运行代码。
输出一段可运行的 SwiftUI 代码,实现液态玻璃卡片的视觉与交互动效。
请为 UIKit 设计一个 Liquid Glass 风格导航栏方案,说明如何实现半透明玻璃材质、滚动时反射变化,以及与浅色/深色模式的适配,并提供示例代码。
给出 UIKit 实现思路、关键样式说明,以及可参考的示例代码。
请为 WidgetKit 生成一个液态玻璃风格的小组件设计方案,包含层次结构、模糊与高光建议、内容排版原则,以及对应的 SwiftUI 组件代码。
输出小组件的视觉规范说明与对应代码,便于直接制作原型或开发。
Patterns for implementing Apple's Liquid Glass — a dynamic material that blurs content behind it, reflects color and light from surrounding content, and reacts to touch and pointer interactions. Covers SwiftUI, UIKit, and WidgetKit integration.
The simplest way to add Liquid Glass to any view:
Text("Hello, World!")
.font(.title)
.padding()
.glassEffect() // Default: regular variant, capsule shape
Text("Hello, World!")
.font(.title)
.padding()
.glassEffect(.regular.tint(.orange).interactive(), in: .rect(cornerRadius: 16.0))
Key customization options:
.regular — standard glass effect.tint(Color) — add color tint for prominence.interactive() — react to touch and pointer interactions.capsule (default), .rect(cornerRadius:), .circleButton("Click Me") { /* action */ }
.buttonStyle(.glass)
Button("Important") { /* action */ }
.buttonStyle(.glassProminent)
Always wrap multiple glass views in a container for performance and morphing:
GlassEffectContainer(spacing: 40.0) {
HStack(spacing: 40.0) {
Image(systemName: "scribble.variable")
.frame(width: 80.0, height: 80.0)
.font(.system(size: 36))
.glassEffect()
Image(systemName: "eraser.fill")
.frame(width: 80.0, height: 80.0)
.font(.system(size: 36))
.glassEffect()
}
}
The spacing parameter controls merge distance — closer elements blend their glass shapes together.
Combine multiple views into a single glass shape with glassEffectUnion:
@Namespace private var namespace
GlassEffectContainer(spacing: 20.0) {
HStack(spacing: 20.0) {
ForEach(symbolSet.indices, id: \.self) { item in
Image(systemName: symbolSet[item])
.frame(width: 80.0, height: 80.0)
.glassEffect()
.glassEffectUnion(id: item < 2 ? "group1" : "group2", namespace: namespace)
}
}
}
Create smooth morphing when glass elements appear/disappear:
@State private var isExpanded = false
@Namespace private var namespace
GlassEffectContainer(spacing: 40.0) {
HStack(spacing: 40.0) {
Image(systemName: "scribble.variable")
.frame(width: 80.0, height: 80.0)
.glassEffect()
.glassEffectID("pencil", in: namespace)
if isExpanded {
Image(systemName: "eraser.fill")
.frame(width: 80.0, height: 80.0)
.glassEffect()
.glassEffectID("eraser", in: namespace)
}
}
}
Button("Toggle") {
withAnimation { isExpanded.toggle() }
}
.buttonStyle(.glass)
To allow horizontal scroll content to extend under a sidebar or inspector, ensure the ScrollView content reaches the leading/trailing edges of the container. The system automatically handles the under-sidebar scrolling behavior when the layout extends to the edges — no additional modifier is needed.
let glassEffect = UIGlassEffect()
glassEffect.tintColor = UIColor.systemBlue.withAlphaComponent(0.3)
glassEffect.isInteractive = true
let visualEffectView = UIVisualEffectView(effect: glassEffect)
visualEffectView.translatesAutoresizingMaskIntoConstraints = false
…
在不改变程序行为的前提下,协调完成可验证、可提交的代码重构流程
使用 Exa 神经搜索进行网页、代码、公司与人物的深度研究检索。
帮助团队统筹 GitHub 与 Linear 的任务流、PR 分诊和执行协同。
帮助开发者发现并评估 Laravel 插件,检查健康度与兼容性
用于规划伊藤篮子研究型数据图谱代理的架构、参数与协作流程
帮助开发者为具备交易权限的智能代理设计安全防护与风控机制
为 AI 编码代理提供精选且最新的 SwiftUI 组件参考与生成支持。
使用 MockDeviceKit 在无实体眼镜硬件时进行功能联调与测试验证
帮助你编写和排查 Guigui 框架的 GUI 组件与交互逻辑。
帮助开发可视化界面,完成显示设备选择、控件配置与多媒体播放集成。
帮助你从间距、字体、阴影与交互细节入手,系统提升界面精致感。
将参考界面提炼为可量化的设计DNA,并据此生成风格一致的UI方案。