liquid-glass-native
Skill0 starsChanged 7 days agoMITView on GitHub
Use for native Apple Liquid Glass in SwiftUI, UIKit or AppKit, including a SwiftUI custom button, glassEffect signatures, GlassEffectContainer spacing, UIGlassEffect, system glass button styles, availability fallbacks and Reduce Transparency. Prefer system materials over custom web-style optics.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/llms.txtllms.txt
- liquid-glass-suiteSkill
- liquid-glass-debugSkill
- liquid-glass-opticsSkill
- liquid-glassSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Use availability checks and an older-OS material fallback.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Liquid Glass native
Prefer no custom material code. Standard navigation, controls, buttons and presentation surfaces adopt the system material on the corresponding SDKs. Remove competing custom backgrounds, keep glass in the navigation/overlay layer, and test the oldest supported OS plus Reduce Transparency, Increase Contrast and Reduce Motion.
For a SwiftUI button, first try the system styles rather than drawing a lens:
Button("OK") { }
.buttonStyle(.glass)
// Use .glassProminent when the design calls for the prominent variant.Custom views: verified core
Use availability checks and an older-OS material fallback. Apply geometry, padding and appearance before glassEffect so the captured content and shape are correct.
@ViewBuilder
func materialContent<Content: View>(_ content: Content) -> some View {
if #available(iOS 26.0, macOS 26.0, tvOS 26.0, watchOS 26.0, *) {
content.glassEffect(.regular, in: RoundedRectangle(cornerRadius: 16))
} else {
content.background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 16))
}
}The DocC-checked declaration is:
nonisolated func glassEffect(
_ glass: Glass = .regular,
in shape: some Shape = DefaultGlassEffectShape()
) -> some ViewThere is no glassEffect(_:in:isEnabled:) parameter in this declaration. Do not invent it. DefaultGlassEffectShape is a capsule. Use .regular for adaptive legibility, .clear only over rich media with the required dimming consideration, and .identity to opt out; .tint(...) and .interactive(...) are builders.
Containers and UIKit
GlassEffectContainer(spacing:) uses a merge threshold, not layout spacing. A threshold larger than the actual gap can merge shapes at rest; keep it below the gap when shapes must remain separate. Use stable IDs/a namespace for intentional morphing or union.
UIKit hosts UIGlassEffect in UIVisualEffectView(effect:) and places content in contentView; there is no documented UIGlassEffectView host here. Use UIGlassContainerEffect for grouped shapes. AppKit has NSGlassEffectView and NSGlassEffectContainerView. Verify all release-specific styles, availability and compatibility keys against the deployed SDK.
Full sourced guidance and Apple primary links: ../../shared/references/13-native-apple.md. The extended platform appendix is in ../../shared/references/15-honesty-and-checklists.md.
Scope and deeper native workflow
Browser CSS/WebGL recreations do not implement Apple's private material. These declarations were checked against Apple DocC for the package maintenance pass; native samples were not compiled on Apple hardware in this restructure. For full iOS migration workflows, haider-nawaz/liquid-glass-skill is the deeper native-first tool.
Part of liquid-glass-suite — install the suite, not this folder alone.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

