Interactive previews iPhone
Glass effect
Applies the Liquid Glass effect to a view
Platform Compatibility
iOS 26.0+ iPadOS 26.0+ macOS 26.0+ watchOS 26.0+ tvOS 26.0+
Tags
SwiftUI Code
HStack {
Text("Foo")
.padding()
.glassEffect()
Text("Foo")
.padding()
.glassEffect(in: .rect(cornerRadius: 10))
Text("Foo")
.padding()
.glassEffect(.regular.interactive())
Text("Foo")
.padding()
.glassEffect(.regular.tint(.red))
}Found an issue or have a suggestion?
Created: June 10, 2025Updated: June 10, 2025
More View Components
View allToolbar Vertical Edge
This value reflects the system’s preferred edge for the vertical bar in the current context, regardless of whether a vertical bar is currently visible. Use it to position custom bars or other UI relative to the system’s bar placement.
Music Picker
Presents a music picker to select items from the Apple Music catalog and the user’s music library.
Explore Other Components
Browse allStore View
Creates a view to load and merchandise a collection of products from the App Store using product identifiers. Internally, ProductView is used, and therefore productViewStyle can also be applied here.
Pinned Toolbar Item Placement
A placement that pins the item to the trailing edge of the toolbar.