Agent skills for iOS, iPadOS, Swift, SwiftUI, and modern Apple framework development.
71
89%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Advisory
Suggest reviewing before use
Liquid Glass is a dynamic translucent material available on iOS 26.0+, iPadOS 26.0+, macOS 26.0+, Mac Catalyst 26.0+, tvOS 26.0+, and watchOS 26.0+. It blurs content behind it, reflects color and light from surrounding content, and reacts to touch and pointer interactions in real time. Standard SwiftUI components (tab bars, toolbars, navigation bars, sheets, popovers) adopt Liquid Glass automatically when built with the latest SDK.
This reference covers the complete API surface for applying Liquid Glass to custom views.
Applies the Liquid Glass effect behind a view.
nonisolated func glassEffect(
_ glass: Glass = .regular,
in shape: some Shape = DefaultGlassEffectShape()
) -> some ViewThe system renders a shape anchored behind the view with the Liquid Glass material and
applies foreground effects over the view content. The default shape is Capsule.
Apply this modifier after other modifiers that affect the view's appearance (padding, frame, font, foregroundStyle).
Text("Hello, World!")
.font(.title)
.padding()
.glassEffect()Text("Hello, World!")
.font(.title)
.padding()
.glassEffect(in: .rect(cornerRadius: 16.0))Common shapes: .capsule (default), .rect(cornerRadius:), .circle.
Text("Hello, World!")
.font(.title)
.padding()
.glassEffect(.regular.tint(.orange).interactive())A structure that defines the configuration of the Liquid Glass material. Conforms to
Equatable, Sendable, and SendableMetatype.
| Property | Description |
|---|---|
.regular | Standard Liquid Glass material |
.clear | Clear variant with minimal visual weight |
.identity | No-op; content appears as if no glass effect was applied |
| Method | Description |
|---|---|
.tint(_ color: Color) | Returns a copy with a color tint to suggest prominence |
.interactive(_ isInteractive: Bool = true) | Returns a copy that reacts to touch and pointer interactions |
Methods are chainable:
.glassEffect(.regular.tint(.blue).interactive())A view that combines multiple Liquid Glass shapes into a single rendering pass. Enables blending and morphing between individual shapes.
@MainActor @preconcurrency
struct GlassEffectContainer<Content> where Content : ViewConforms to View, Sendable, SendableMetatype.
init(spacing: CGFloat, @ViewBuilder content: () -> Content)The spacing parameter controls how glass shapes interact:
Match the container spacing to the interior layout spacing so shapes remain separate at rest but merge during animated transitions.
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()
}
}Associates a stable identity with a Liquid Glass effect for morphing during view hierarchy transitions.
nonisolated func glassEffectID(
_ id: (some Hashable & Sendable)?,
in namespace: Namespace.ID
) -> some ViewUse with @Namespace, GlassEffectContainer, and withAnimation to animate shapes
morphing into each other when views appear or disappear.
@State private var isExpanded = false
@Namespace private var namespace
var body: some View {
GlassEffectContainer(spacing: 40.0) {
HStack(spacing: 40.0) {
Image(systemName: "scribble.variable")
.frame(width: 80.0, height: 80.0)
.font(.system(size: 36))
.glassEffect()
.glassEffectID("pencil", in: namespace)
if isExpanded {
Image(systemName: "eraser.fill")
.frame(width: 80.0, height: 80.0)
.font(.system(size: 36))
.glassEffect()
.glassEffectID("eraser", in: namespace)
}
}
}
Button("Toggle") {
withAnimation {
isExpanded.toggle()
}
}
.buttonStyle(.glass)
}Merges multiple views into a single Liquid Glass shape. All effects with the same shape, Glass variant, and union ID combine into one rendered shape.
@MainActor @preconcurrency func glassEffectUnion(
id: (some Hashable & Sendable)?,
namespace: Namespace.ID
) -> some ViewUseful for dynamically created views or views outside a shared layout container.
@Namespace private var namespace
let symbols = ["cloud.bolt.rain.fill", "sun.rain.fill", "moon.stars.fill", "moon.fill"]
GlassEffectContainer(spacing: 20.0) {
HStack(spacing: 20.0) {
ForEach(symbols.indices, id: \.self) { i in
Image(systemName: symbols[i])
.frame(width: 80.0, height: 80.0)
.font(.system(size: 36))
.glassEffect()
.glassEffectUnion(id: i < 2 ? "weather" : "night", namespace: namespace)
}
}
}Controls how a glass effect appears or disappears during view hierarchy changes.
@MainActor @preconcurrency func glassEffectTransition(
_ transition: GlassEffectTransition
) -> some ViewA structure describing changes when a glass effect is added to or removed from the
view hierarchy. Conforms to Sendable and SendableMetatype.
| Transition | Behavior |
|---|---|
.matchedGeometry | Morphs the shape to/from nearby glass effects. Default when within container spacing. |
.materialize | Fades content and animates the glass material in/out without geometry matching. Use for distant effects. |
.identity | No transition animation. |
if isExpanded {
Image(systemName: "note")
.frame(width: 20, height: 20)
.glassEffect()
.glassEffectID("note", in: namespace)
.glassEffectTransition(.materialize)
}SwiftUI provides two built-in Liquid Glass button styles.
Standard glass appearance for buttons.
Button("Action") { }
.buttonStyle(.glass)A more prominent glass appearance for primary actions.
Button("Confirm") { }
.buttonStyle(.glassProminent)These button styles automatically include interactivity (touch/pointer reactions).
Prefer these over manually applying .glassEffect(.regular.interactive()) to buttons.
The default shape used by glassEffect(_:in:) when no shape is specified. Resolves
to Capsule.
Configures the scroll edge effect style for scroll views within a view hierarchy.
nonisolated func scrollEdgeEffectStyle(
_ style: ScrollEdgeEffectStyle?,
for edges: Edge.Set
) -> some ViewAvailable styles include .soft (soft edge) and .hard. System bars adopt this
automatically. Apply to custom bars that float over scrollable content.
.scrollEdgeEffectStyle(.soft, for: .top)Extend content visually under sidebars and inspectors by duplicating the view into mirrored copies with a blur effect applied on top:
NavigationSplitView {
// sidebar content
} detail: {
ZStack {
BannerView()
.backgroundExtensionEffect()
}
}Also available as backgroundExtensionEffect(isEnabled:) for conditional use.
Apply with discretion — typically to a single background view in the detail column.
All Liquid Glass APIs require iOS 26.0+. Always provide a fallback:
if #available(iOS 26, *) {
content
.padding()
.glassEffect(.regular, in: .rect(cornerRadius: 16))
} else {
content
.padding()
.background(.ultraThinMaterial, in: RoundedRectangle(cornerRadius: 16))
}GlassEffectContainer to batch multiple glass effects into a single render pass.GlassEffectContainer instances when one can suffice.GlassEffectContainer when multiple glass views coexist..glassEffect() after layout and appearance modifiers.spacing to interior layout spacing..interactive() only on tappable/focusable elements.withAnimation when toggling views with glassEffectID for morphing..buttonStyle(.glass) / .buttonStyle(.glassProminent) for buttons.if #available(iOS 26, *) and provide fallback UI.skills
accessorysetupkit
references
activitykit
references
adattributionkit
references
alarmkit
references
app-clips
app-intents
references
app-store-optimization
app-store-review
apple-on-device-ai
appmigrationkit
references
audioaccessorykit
references
authentication
references
avkit
references
background-processing
references
browserenginekit
references
callkit
references
carplay
references
cloudkit
references
contacts-framework
references
core-bluetooth
references
core-data
core-motion
references
core-nfc
references
coreml
references
cryptokit
references
cryptotokenkit
references
debugging-instruments
device-integrity
references
dockkit
references
energykit
references
eventkit
references
financekit
references
focus-engine
gamekit
references
healthkit
references
homekit
references
ios-accessibility
ios-localization
ios-networking
ios-simulator
references
mapkit
metrickit
references
musickit
references
natural-language
references
paperkit
references
passkit
references
pdfkit
references
pencilkit
references
permissionkit
references
photokit
push-notifications
realitykit
references
relevancekit
references
scenekit
references
sensorkit
references
speech-recognition
spritekit
references
storekit
swift-api-design-guidelines
swift-architecture
swift-charts
references
swift-codable
swift-concurrency
swift-formatstyle
swift-language
swift-security
references
swift-testing
swiftdata
swiftlint
swiftui-animation
swiftui-gestures
references
swiftui-layout-components
swiftui-liquid-glass
references
swiftui-patterns
swiftui-performance
swiftui-uikit-interop
swiftui-webkit
tabletopkit
references
tipkit
references
vision-framework
weatherkit
references
widgetkit
references