swiftui-liquid-glass by steipete/agent-scripts
npx skills add https://github.com/steipete/agent-scripts --skill swiftui-liquid-glass来源说明:复制自 @Dimillian 的 Dimillian/Skills (2025-12-31)。
使用此技能来构建或审查完全符合 iOS 26+ Liquid Glass API 的 SwiftUI 功能。优先使用原生 API(glassEffect、GlassEffectContainer、玻璃按钮样式)和苹果设计指南。保持用法一致、在需要时具有交互性,并注意性能。
根据请求选择相应路径:
GlassEffectContainer。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
GlassEffectContainer。.glassEffect(...)。.interactive()。#available(iOS 26, *) 进行条件判断,并提供非玻璃效果的降级方案。#available(iOS 26, *) 并提供降级 UI。GlassEffectContainer 中。glassEffect 在布局/外观修饰符之后应用。interactive()。glassEffectID 配合 @Namespace 实现变形效果。GlassEffectContainer 中,并调整间距。.glassEffect(.regular.tint(...).interactive(), in: .rect(cornerRadius: ...))。.buttonStyle(.glass) / .buttonStyle(.glassProminent)。glassEffectID 添加变形过渡效果。直接使用这些模式,并根据需要调整形状/色调/间距。
if #available(iOS 26, *) {
Text("Hello")
.padding()
.glassEffect(.regular.interactive(), in: .rect(cornerRadius: 16))
} else {
Text("Hello")
.padding()
.background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 16))
}
GlassEffectContainer(spacing: 24) {
HStack(spacing: 24) {
Image(systemName: "scribble.variable")
.frame(width: 72, height: 72)
.font(.system(size: 32))
.glassEffect()
Image(systemName: "eraser.fill")
.frame(width: 72, height: 72)
.font(.system(size: 32))
.glassEffect()
}
}
Button("Confirm") { }
.buttonStyle(.glassProminent)
references/liquid-glass.md每周安装量
85
代码仓库
GitHub 星标数
2.3K
首次出现
2026年1月21日
安全审计
安装于
opencode74
codex70
gemini-cli69
cursor68
claude-code66
github-copilot62
Attribution: copied from @Dimillian’sDimillian/Skills (2025-12-31).
Use this skill to build or review SwiftUI features that fully align with the iOS 26+ Liquid Glass API. Prioritize native APIs (glassEffect, GlassEffectContainer, glass button styles) and Apple design guidance. Keep usage consistent, interactive where needed, and performance aware.
Choose the path that matches the request:
GlassEffectContainer where multiple glass elements appear.GlassEffectContainer when multiple glass elements coexist..glassEffect(...) after layout and visual modifiers..interactive() for elements that respond to touch/pointer.#available(iOS 26, *) and provide a non-glass fallback.#available(iOS 26, *) present with fallback UI.GlassEffectContainer.glassEffect applied after layout/appearance modifiers.interactive() only where user interaction exists.glassEffectID used with @Namespace for morphing.GlassEffectContainer and tune spacing..glassEffect(.regular.tint(...).interactive(), in: .rect(cornerRadius: ...)) as needed..buttonStyle(.glass) / .buttonStyle(.glassProminent) for actions.glassEffectID when hierarchy changes.Use these patterns directly and tailor shapes/tints/spacing.
if #available(iOS 26, *) {
Text("Hello")
.padding()
.glassEffect(.regular.interactive(), in: .rect(cornerRadius: 16))
} else {
Text("Hello")
.padding()
.background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 16))
}
GlassEffectContainer(spacing: 24) {
HStack(spacing: 24) {
Image(systemName: "scribble.variable")
.frame(width: 72, height: 72)
.font(.system(size: 32))
.glassEffect()
Image(systemName: "eraser.fill")
.frame(width: 72, height: 72)
.font(.system(size: 32))
.glassEffect()
}
}
Button("Confirm") { }
.buttonStyle(.glassProminent)
references/liquid-glass.mdWeekly Installs
85
Repository
GitHub Stars
2.3K
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykPass
Installed on
opencode74
codex70
gemini-cli69
cursor68
claude-code66
github-copilot62
Intercom自动化指南:通过Rube MCP与Composio实现客户支持对话管理
69 周安装
二进制初步分析指南:使用ReVa工具快速识别恶意软件与逆向工程
69 周安装
PrivateInvestigator 道德人员查找工具 | 公开数据调查、反向搜索与背景研究
69 周安装
TorchTitan:PyTorch原生分布式大语言模型预训练平台,支持4D并行与H100 GPU加速
69 周安装
screenshot 截图技能:跨平台桌面截图工具,支持macOS/Linux权限管理与多模式捕获
69 周安装
tmux进程管理最佳实践:交互式Shell初始化、会话命名与生命周期管理
69 周安装