Glass effect
Applies the Liquid Glass effect to a view
Platform Compatibility
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?
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 allTabsPickerStyle
A picker style that presents options as segmented tabs. On macOS, this style produces a segmented picker with a visual treatment that distinguishes tab navigation from value selection. On iOS, tvOS, and visionOS, the visual appearance matches that of the standard standard .segmented style. On all supported platforms, VoiceOver announces options as tabs.
Disclosure Group
A view that shows or hides another content view, based on the state of a disclosure control.
Button Styles
A type that applies standard interaction behavior and a custom appearance to all buttons within a view hierarchy